<!DOCTYPE html>
<html lang="en-US">
    <head>
        <title>perlfunc - Perl builtin functions - metacpan.org</title>
        <link rel="preload" as="fetch" href="https://metacpan.org/account/login_status" crossorigin="anonymous" />
        <link href="https://metacpan.org/_assets/b8ccceeed47a0652049703d99326a9cea4933443.css" rel="stylesheet" type="text/css">
        <script src="https://metacpan.org/_assets/6bfedafe2d7caa915b7d84f61b45936818e3242e.js" type="text/javascript" defer></script>
        <link rel="alternate" type="application/rss+xml" title="Recent CPAN Uploads of perl - MetaCPAN" href="https://metacpan.org/dist/perl/releases.rss" />
        <link rel="canonical" href="https://metacpan.org/dist/perl/view/pod/perlfunc.pod" />
        <meta name="description" content="Perl builtin functions" />
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5">
        <link rel="shortcut icon" href="https://metacpan.org/static/icons/favicon.ico">
        <link rel="apple-touch-icon" sizes="152x152" href="https://metacpan.org/static/icons/apple-touch-icon.png">
        <link rel="search" href="https://metacpan.org/static/opensearch.xml" type="application/opensearchdescription+xml" title="MetaCPAN">
        <script>
          (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
          (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
          m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
          })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

          (function(skey, ga_id){
            ga('create', ga_id, {
              siteSpeedSampleRate : 100,
              storage             : 'none',
              clientId            : localStorage.getItem(skey)
            });
            ga(function(tracker) {
              localStorage.setItem(skey, tracker.get('clientId'));
            });
            ga('send', 'pageview');
          })('ga:clientId', 'UA-27829474-1');
        </script>
<meta name="twitter:card"        content="summary" />
<meta name="twitter:url"         content="https://metacpan.org/pod/perlfunc" />
<meta name="twitter:title"       content="perlfunc" />
<meta name="twitter:description" content="Perl builtin functions" />
<meta name="twitter:site"        content="metacpan" />
    </head>
    <body>
        <nav class="navbar navbar-default" role="navigation">
            <div class="header-logo-large hidden-xs">
              <a href="https://metacpan.org/" tabindex="0">
                <svg class="logo" aria-label="MetaCPAN">
                  <use class="logo" href="/static/images/metacpan-logo.svg#logo" />
                </svg>
              </a>
            </div>
            <div class="header-logo-icon visible-xs">
              <a href="https://metacpan.org/">
                <svg class="logo" aria-label="MetaCPAN">
                  <use class="logo" href="/static/images/metacpan-logo.svg#dots" />
                </svg>
              </a>
            </div>
            <ul class="nav navbar-nav menu-items hidden-xs hidden-sm">
              <li><a href="https://metacpan.org/about">About</a></li>
              <li><a href="https://metacpan.org/about/sponsors">Sponsor</a></li>
              <li><a href="https://grep.metacpan.org/">grep::cpan</a></li>
              <li><a href="https://metacpan.org/recent">Recent</a></li>
              <li><a href="https://metacpan.org/about/faq">FAQ</a></li>
              <li><a href="https://metacpan.org/tools">Tools</a></li>
              <li><a href="https://fastapi.metacpan.org/">API</a></li>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                <button type="button" class="searchbar-btn visible-xs visible-sm">
                    <i class="fa fa-search button-fa-icon"></i>
                </button>
                <form action="https://metacpan.org/search" class="searchbar-form visible-md visible-lg search-form form-horizontal">
                   <input type="hidden" name="size" id="metacpan_search-size" value="20">
                  <div class="form-group">
                      <div class="search-group">
                        <i class="fa fa-search"></i>
                        <input type="text" name="q" placeholder="Search the CPAN" size="41" autocorrect="off" autocapitalize="off" spellcheck="false" id="metacpan_search-input" class="form-control" value="">
                      </div>
                  </div>
                </form>
                    <li class="icon-slidepanel visible-xs visible-sm">
                      <button data-toggle="slidepanel" data-target=".slidepanel">
                        <span class="button-fa-icon">
                          <i class="fa fa-bars slidepanel-open"></i>
                          <i class="fa fa-times slidepanel-close"></i>
                        </span>
                      </button>
                    </li>
                <form action="https://metacpan.org/account/logout" method="POST" id="metacpan-logout"></form>
                <li class="dropdown logged_in" style="display: none;">
                    <button type="button" class="dropdown-toggle" data-toggle="dropdown">
                      <i class="fa fa-user button-fa-icon logged-in-icon" aria-hidden="true"></i>
                      <i class="fas fa-chevron-down"></i>
                    </button>
                    <ul class="dropdown-menu">
                        <li><a href="https://metacpan.org/account/identities">Identities</a></li>
                        <li><a href="https://metacpan.org/account/profile">Profile</a></li>
                        <li><a href="https://metacpan.org/account/favorite/list">Favorites</a></li>
                        <li>
                            <a href="CORE.html#" type="button" onclick="$('#metacpan-logout').submit(); return false">
                              Logout
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="dropdown logged_out" style="display: none;">
                    <button type="button" class="dropdown-toggle" data-toggle="dropdown">
                      <i class="fa fa-user button-fa-icon" aria-hidden="true"></i>
                      <i class="fas fa-chevron-down"></i>
                    </button>
                    <ul class="dropdown-menu">
                        <li>
                            <a href="https://metacpan.org/login/github">
                                <i class="fab fa-github fa-fw"></i>
                                GitHub
                            </a>
                        </li>
                        <li>
                            <a href="https://metacpan.org/login/twitter">
                                <i class="fab fa-twitter fa-fw"></i>
                                Twitter
                            </a>
                        </li>
                        <li>
                            <a href="https://metacpan.org/login/google">
                                <i class="fab fa-google fa-fw"></i>
                                Google
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="dropdown logged_placeholder">
                    <button>
                      <i class="fa fa-user button-fa-icon" aria-hidden="true"></i>
                    </button>
                </li>
            </ul>
        </nav>
        <div class="page-content ">
          <!--
          <div class="top-notify-banner">
            <i class="fas fa-info-circle"></i>
          </div>
          -->
          <nav class="sidebar">
            <div class="slidepanel">
              <ul class="nav-list ">
    <li class="nav-header no-margin-top">
      <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The date that this version of perl was released.">
      <span class="relatize">29 Nov 2023 16:10:36 UTC</span>
    </li>
  <li>
    Distribution: <a href="https://metacpan.org/dist/perl">perl</a>
  </li>
  <li>
    <a data-keyboard-shortcut="g s" href="https://metacpan.org/dist/perl/source/pod/perlfunc.pod">Source</a>
    (<a href="https://metacpan.org/dist/perl/source/pod/perlfunc.pod?raw=1">raw</a>)
  </li>
  <li>
    <a data-keyboard-shortcut="g b" href="https://metacpan.org/dist/perl/source/pod">Browse</a>
    (<a href="https://metacpan.org/dist/perl/source/pod?raw=1">raw</a>)
  </li>
    <li>
      <a data-keyboard-shortcut="g c" href="https://metacpan.org/dist/perl/changes">Changes</a>
    </li>
    <li>
      <a rel="noopener nofollow" class="nopopup" href="https://www.perl.org/">Homepage</a>
    </li>
    <li>
      <a class="nopopup" href="https://metacpan.org/dist/perl/contribute">How to Contribute</a>
    </li>
    <li>
        <a rel="noopener nofollow" data-keyboard-shortcut="g r" href="https://github.com/Perl/perl5">Repository</a>
    </li>
    <li>
      <a rel="noopener nofollow" data-keyboard-shortcut="g i" href="https://github.com/Perl/perl5/issues">Issues</a>
      (2152)
    </li>
    <li>
      <a rel="noopener nofollow" href="http://matrix.cpantesters.org/?dist=perl+5.38.2" title="Matrix">Testers</a>
    </li>
    <li>
      <a rel="noopener nofollow" href="http://cpants.cpanauthors.org/release/PEVANS/perl-5.38.2">Kwalitee</a>
    </li>
    <li>
      <div class="ttip" data-toggle="tooltip" data-placement="bottom" title="The # people with an indexing permission on perl who have released something to CPAN in the last 2 years (i.e. the # people likely able to release critical fixes in a timely manner)">
      Bus factor: 15
      </div>
    </li>
    <li>
      License: perl_5
    </li>
    <li class="nav-header">Activity</li>
    <li>
<div class="activity-graph">
    <img src="https://metacpan.org/dist/perl/activity.svg?res=month" />
    <div class="comment">24 month</div>
</div>
    </li>
    <li class="nav-header">Tools</li>
    <li>
      <a itemprop="downloadUrl" href="https://cpan.metacpan.org/authors/id/P/PE/PEVANS/perl-5.38.2.tar.gz">
      Download (<span itemprop="fileSize">20.28MB</span>)</a>
    </li>
    <li>
      <a href="https://explorer.metacpan.org/?url=%2Fmodule%2FPEVANS%2Fperl-5.38.2%2Fpod%2Fperlfunc.pod">
        MetaCPAN Explorer
      </a>
    </li>
    <li>
      <a href="https://metacpan.org/dist/perl/permissions">
        Permissions
      </a>
    </li>
    <li>
      <a href="https://metacpan.org/dist/perl/releases.rss">
        Subscribe to distribution
      </a>
    </li>
    <li>
      <button class="btn btn-link" data-toggle="modal" data-target="#metacpan_install-instructions-dialog">
        Install Instructions
      </button>
    </li>
    <li>
      <form action="https://metacpan.org/search">
        <input type="hidden" name="q" value="dist:perl">
        <input type="search" name="q" placeholder="Search distribution" class="form-control tool-bar-form">
        <input type="submit" style="display: none">
      </form>
    </li>
    <li>
      <form action="https://grep.metacpan.org/search">
        <input type="hidden" name="qd" value="perl">
        <input type="hidden" name="source" value="metacpan">
        <input type="search" name="q" placeholder="grep distribution" class="form-control tool-bar-form">
        <input type="submit" style="display: none">
     </form>
    </li>
    <li class="version-jump">
<select onchange="document.location.href=&#39;/release/&#39;+this.value+&#39;/view/pod/perlfunc.pod&#39;" class="form-control tool-bar-form">
  <option disabled selected>Jump to version</option>
<option
  
  value="CORION/perl-5.39.7"
>5.39.7 DEV
  (CORION on 2024-01-20)</option>
<option
  
  value="BOOK/perl-5.39.6"
>5.39.6 DEV
  (BOOK on 2023-12-30)</option>
<option
  disabled
  value="PEVANS/perl-5.38.2"
>5.38.2
  (PEVANS on 2023-11-29)</option>
<option
  
  value="PEVANS/perl-5.36.3"
>5.36.3
  (PEVANS on 2023-11-29)</option>
<option
  
  value="PEVANS/perl-5.34.3"
>5.34.3
  (PEVANS on 2023-11-29)</option>
<option
  
  value="ETHER/perl-5.39.5"
>5.39.5 DEV
  (ETHER on 2023-11-20)</option>
<option
  
  value="HAARG/perl-5.39.4"
>5.39.4 DEV
  (HAARG on 2023-10-25)</option>
<option
  
  value="WOLFSAGE/perl-5.39.3"
>5.39.3 DEV
  (WOLFSAGE on 2023-09-20)</option>
<option
  
  value="PEVANS/perl-5.39.2"
>5.39.2 DEV
  (PEVANS on 2023-08-20)</option>
<option
  
  value="SHAY/perl-5.39.1"
>5.39.1 DEV
  (SHAY on 2023-07-20)</option>
<option
  
  value="RJBS/perl-5.38.0"
>5.38.0
  (RJBS on 2023-07-02)</option>
<option
  
  value="RJBS/perl-5.38.0-RC2"
>5.38.0-RC2 DEV
  (RJBS on 2023-06-23)</option>
<option
  
  value="RJBS/perl-5.38.0-RC1"
>5.38.0-RC1 DEV
  (RJBS on 2023-06-16)</option>
<option
  
  value="SHAY/perl-5.36.1"
>5.36.1
  (SHAY on 2023-04-23)</option>
<option
  
  value="SHAY/perl-5.37.11"
>5.37.11 DEV
  (SHAY on 2023-04-20)</option>
<option
  
  value="SHAY/perl-5.36.1-RC3"
>5.36.1-RC3 DEV
  (SHAY on 2023-04-16)</option>
<option
  
  value="SHAY/perl-5.36.1-RC2"
>5.36.1-RC2 DEV
  (SHAY on 2023-04-11)</option>
<option
  
  value="SHAY/perl-5.36.1-RC1"
>5.36.1-RC1 DEV
  (SHAY on 2023-04-10)</option>
<option
  
  value="YVES/perl-5.37.10"
>5.37.10 DEV
  (YVES on 2023-03-21)</option>
<option
  
  value="ETHER/perl-5.37.9"
>5.37.9 DEV
  (ETHER on 2023-02-20)</option>
<option
  
  value="RENEEB/perl-5.37.8"
>5.37.8 DEV
  (RENEEB on 2023-01-20)</option>
<option
  
  value="HYDAHY/perl-5.37.7"
>5.37.7 DEV
  (HYDAHY on 2022-12-20)</option>
<option
  
  value="CORION/perl-5.37.6"
>5.37.6 DEV
  (CORION on 2022-11-20)</option>
<option
  
  value="TODDR/perl-5.37.5"
>5.37.5 DEV
  (TODDR on 2022-10-20)</option>
<option
  
  value="ETHER/perl-5.37.4"
>5.37.4 DEV
  (ETHER on 2022-09-21)</option>
<option
  
  value="ATOOMIC/perl-5.37.2"
>5.37.2 DEV
  (ATOOMIC on 2022-07-21)</option>
<option
  
  value="WOLFSAGE/perl-5.37.1"
>5.37.1 DEV
  (WOLFSAGE on 2022-06-20)</option>
<option
  
  value="RJBS/perl-5.37.0"
>5.37.0 DEV
  (RJBS on 2022-05-28)</option>
<option
  
  value="RJBS/perl-5.36.0"
>5.36.0
  (RJBS on 2022-05-28)</option>
<option
  
  value="RJBS/perl-5.36.0-RC3"
>5.36.0-RC3 DEV
  (RJBS on 2022-05-22)</option>
<option
  
  value="RJBS/perl-5.36.0-RC2"
>5.36.0-RC2 DEV
  (RJBS on 2022-05-21)</option>
<option
  
  value="SHAY/perl-5.35.11"
>5.35.11 DEV
  (SHAY on 2022-04-20)</option>
<option
  
  value="XSAWYERX/perl-5.35.10"
>5.35.10 DEV
  (XSAWYERX on 2022-03-20)</option>
<option
  
  value="SHAY/perl-5.34.1"
>5.34.1
  (SHAY on 2022-03-13)</option>
<option
  
  value="SHAY/perl-5.34.1-RC2"
>5.34.1-RC2 DEV
  (SHAY on 2022-03-06)</option>
<option
  
  value="SHAY/perl-5.34.1-RC1"
>5.34.1-RC1 DEV
  (SHAY on 2022-02-27)</option>
<option
  
  value="RENEEB/perl-5.35.9"
>5.35.9 DEV
  (RENEEB on 2022-02-20)</option>
<option
  
  value="ATOOMIC/perl-5.35.8"
>5.35.8 DEV
  (ATOOMIC on 2022-01-20)</option>
<option
  
  value="HYDAHY/perl-5.35.6"
>5.35.6 DEV
  (HYDAHY on 2021-11-21)</option>
<option
  
  value="LEONT/perl-5.35.5"
>5.35.5 DEV
  (LEONT on 2021-10-21)</option>
<option
  
  value="WOLFSAGE/perl-5.35.4"
>5.35.4 DEV
  (WOLFSAGE on 2021-09-20)</option>
<option
  
  value="ETHER/perl-5.35.3"
>5.35.3 DEV
  (ETHER on 2021-08-21)</option>
<option
  
  value="CORION/perl-5.35.1"
>5.35.1 DEV
  (CORION on 2021-06-20)</option>
<option
  
  value="RJBS/perl-5.35.0"
>5.35.0 DEV
  (RJBS on 2021-05-21)</option>
<option
  
  value="XSAWYERX/perl-5.34.0"
>5.34.0
  (XSAWYERX on 2021-05-20)</option>
<option
  
  value="XSAWYERX/perl-5.34.0-RC2"
>5.34.0-RC2 DEV
  (XSAWYERX on 2021-05-15)</option>
<option
  
  value="XSAWYERX/perl-5.34.0-RC1"
>5.34.0-RC1 DEV
  (XSAWYERX on 2021-05-04)</option>
<option
  
  value="TODDR/perl-5.33.9"
>5.33.9 DEV
  (TODDR on 2021-04-20)</option>
<option
  
  value="ATOOMIC/perl-5.33.8"
>5.33.8 DEV
  (ATOOMIC on 2021-03-21)</option>
<option
  
  value="RENEEB/perl-5.33.7"
>5.33.7 DEV
  (RENEEB on 2021-02-20)</option>
<option
  
  value="SHAY/perl-5.32.1"
>5.32.1
  (SHAY on 2021-01-23)</option>
<option
  
  value="HYDAHY/perl-5.33.6"
>5.33.6 DEV
  (HYDAHY on 2021-01-21)</option>
<option
  
  value="SHAY/perl-5.32.1-RC1"
>5.32.1-RC1 DEV
  (SHAY on 2021-01-09)</option>
<option
  
  value="CORION/perl-5.33.5"
>5.33.5 DEV
  (CORION on 2020-12-20)</option>
<option
  
  value="SHAY/perl-5.33.3"
>5.33.3 DEV
  (SHAY on 2020-10-20)</option>
<option
  
  value="XSAWYERX/perl-5.33.2"
>5.33.2 DEV
  (XSAWYERX on 2020-09-20)</option>
<option
  
  value="ETHER/perl-5.33.1"
>5.33.1 DEV
  (ETHER on 2020-08-20)</option>
<option
  
  value="XSAWYERX/perl-5.33.0"
>5.33.0 DEV
  (XSAWYERX on 2020-07-17)</option>
<option
  
  value="XSAWYERX/perl-5.32.0"
>5.32.0
  (XSAWYERX on 2020-06-20)</option>
<option
  
  value="XSAWYERX/perl-5.32.0-RC1"
>5.32.0-RC1 DEV
  (XSAWYERX on 2020-06-07)</option>
<option
  
  value="XSAWYERX/perl-5.30.3-RC1"
>5.30.3-RC1 DEV
  (XSAWYERX on 2020-06-01)</option>
<option
  
  value="XSAWYERX/perl-5.30.3"
>5.30.3
  (XSAWYERX on 2020-06-01)</option>
<option
  
  value="XSAWYERX/perl-5.28.3-RC1"
>5.28.3-RC1 DEV
  (XSAWYERX on 2020-06-01)</option>
<option
  
  value="XSAWYERX/perl-5.28.3"
>5.28.3
  (XSAWYERX on 2020-06-01)</option>
<option
  
  value="XSAWYERX/perl-5.32.0-RC0"
>5.32.0-RC0 DEV
  (XSAWYERX on 2020-05-30)</option>
<option
  
  value="XSAWYERX/perl-5.31.11"
>5.31.11 DEV
  (XSAWYERX on 2020-04-28)</option>
<option
  
  value="XSAWYERX/perl-5.31.10"
>5.31.10 DEV
  (XSAWYERX on 2020-03-20)</option>
<option
  
  value="SHAY/perl-5.30.2"
>5.30.2
  (SHAY on 2020-03-14)</option>
<option
  
  value="SHAY/perl-5.30.2-RC1"
>5.30.2-RC1 DEV
  (SHAY on 2020-02-29)</option>
<option
  
  value="RENEEB/perl-5.31.9"
>5.31.9 DEV
  (RENEEB on 2020-02-20)</option>
<option
  
  value="WOLFSAGE/perl-5.31.8"
>5.31.8 DEV
  (WOLFSAGE on 2020-01-20)</option>
<option
  
  value="ATOOMIC/perl-5.31.7"
>5.31.7 DEV
  (ATOOMIC on 2019-12-21)</option>
<option
  
  value="BINGOS/perl-5.31.6"
>5.31.6 DEV
  (BINGOS on 2019-11-20)</option>
<option
  
  value="SHAY/perl-5.30.1"
>5.30.1
  (SHAY on 2019-11-10)</option>
<option
  
  value="SHAY/perl-5.30.1-RC1"
>5.30.1-RC1 DEV
  (SHAY on 2019-10-27)</option>
<option
  
  value="SHAY/perl-5.31.5"
>5.31.5 DEV
  (SHAY on 2019-10-20)</option>
<option
  
  value="CORION/perl-5.31.4"
>5.31.4 DEV
  (CORION on 2019-09-20)</option>
<option
  
  value="SHAY/perl-5.31.2"
>5.31.2 DEV
  (SHAY on 2019-07-20)</option>
<option
  
  value="ETHER/perl-5.31.1"
>5.31.1 DEV
  (ETHER on 2019-06-20)</option>
<option
  
  value="XSAWYERX/perl-5.31.0"
>5.31.0 DEV
  (XSAWYERX on 2019-05-24)</option>
<option
  
  value="XSAWYERX/perl-5.30.0"
>5.30.0
  (XSAWYERX on 2019-05-22)</option>
<option
  
  value="XSAWYERX/perl-5.30.0-RC2"
>5.30.0-RC2 DEV
  (XSAWYERX on 2019-05-17)</option>
<option
  
  value="XSAWYERX/perl-5.30.0-RC1"
>5.30.0-RC1 DEV
  (XSAWYERX on 2019-05-11)</option>
<option
  
  value="XSAWYERX/perl-5.29.10"
>5.29.10 DEV
  (XSAWYERX on 2019-04-20)</option>
<option
  
  value="SHAY/perl-5.28.2"
>5.28.2
  (SHAY on 2019-04-19)</option>
<option
  
  value="SHAY/perl-5.28.2-RC1"
>5.28.2-RC1 DEV
  (SHAY on 2019-04-05)</option>
<option
  
  value="ZAKAME/perl-5.29.9"
>5.29.9 DEV
  (ZAKAME on 2019-03-21)</option>
<option
  
  value="ATOOMIC/perl-5.29.8"
>5.29.8 DEV
  (ATOOMIC on 2019-02-21)</option>
<option
  
  value="ABIGAIL/perl-5.29.7"
>5.29.7 DEV
  (ABIGAIL on 2019-01-20)</option>
<option
  
  value="ABIGAIL/perl-5.29.6"
>5.29.6 DEV
  (ABIGAIL on 2018-12-18)</option>
<option
  
  value="SHAY/perl-5.28.1-RC1"
>5.28.1-RC1 DEV
  (SHAY on 2018-11-30)</option>
<option
  
  value="SHAY/perl-5.26.3-RC1"
>5.26.3-RC1 DEV
  (SHAY on 2018-11-30)</option>
<option
  
  value="SHAY/perl-5.28.1"
>5.28.1
  (SHAY on 2018-11-29)</option>
<option
  
  value="SHAY/perl-5.26.3"
>5.26.3
  (SHAY on 2018-11-29)</option>
<option
  
  value="ETHER/perl-5.29.5"
>5.29.5 DEV
  (ETHER on 2018-11-20)</option>
<option
  
  value="ARC/perl-5.29.4"
>5.29.4 DEV
  (ARC on 2018-10-20)</option>
<option
  
  value="GENEHACK/perl-5.29.3"
>5.29.3 DEV
  (GENEHACK on 2018-09-21)</option>
<option
  
  value="BINGOS/perl-5.29.2"
>5.29.2 DEV
  (BINGOS on 2018-08-20)</option>
<option
  
  value="SHAY/perl-5.29.1"
>5.29.1 DEV
  (SHAY on 2018-07-20)</option>
<option
  
  value="XSAWYERX/perl-5.29.0"
>5.29.0 DEV
  (XSAWYERX on 2018-06-26)</option>
<option
  
  value="XSAWYERX/perl-5.28.0"
>5.28.0
  (XSAWYERX on 2018-06-23)</option>
<option
  
  value="XSAWYERX/perl-5.28.0-RC4"
>5.28.0-RC4 DEV
  (XSAWYERX on 2018-06-19)</option>
<option
  
  value="XSAWYERX/perl-5.28.0-RC3"
>5.28.0-RC3 DEV
  (XSAWYERX on 2018-06-18)</option>
<option
  
  value="XSAWYERX/perl-5.28.0-RC2"
>5.28.0-RC2 DEV
  (XSAWYERX on 2018-06-06)</option>
<option
  
  value="XSAWYERX/perl-5.28.0-RC1"
>5.28.0-RC1 DEV
  (XSAWYERX on 2018-05-21)</option>
<option
  
  value="XSAWYERX/perl-5.27.11"
>5.27.11 DEV
  (XSAWYERX on 2018-04-20)</option>
<option
  
  value="SHAY/perl-5.26.2"
>5.26.2
  (SHAY on 2018-04-14)</option>
<option
  
  value="SHAY/perl-5.24.4"
>5.24.4
  (SHAY on 2018-04-14)</option>
<option
  
  value="SHAY/perl-5.26.2-RC1"
>5.26.2-RC1 DEV
  (SHAY on 2018-03-24)</option>
<option
  
  value="SHAY/perl-5.24.4-RC1"
>5.24.4-RC1 DEV
  (SHAY on 2018-03-24)</option>
<option
  
  value="TODDR/perl-5.27.10"
>5.27.10 DEV
  (TODDR on 2018-03-20)</option>
<option
  
  value="RENEEB/perl-5.27.9"
>5.27.9 DEV
  (RENEEB on 2018-02-20)</option>
<option
  
  value="ABIGAIL/perl-5.27.8"
>5.27.8 DEV
  (ABIGAIL on 2018-01-20)</option>
<option
  
  value="BINGOS/perl-5.27.7"
>5.27.7 DEV
  (BINGOS on 2017-12-20)</option>
<option
  
  value="ETHER/perl-5.27.6"
>5.27.6 DEV
  (ETHER on 2017-11-20)</option>
<option
  
  value="SHAY/perl-5.27.5"
>5.27.5 DEV
  (SHAY on 2017-10-20)</option>
<option
  
  value="SHAY/perl-5.26.1"
>5.26.1
  (SHAY on 2017-09-22)</option>
<option
  
  value="SHAY/perl-5.24.3"
>5.24.3
  (SHAY on 2017-09-22)</option>
<option
  
  value="GENEHACK/perl-5.27.4"
>5.27.4 DEV
  (GENEHACK on 2017-09-20)</option>
<option
  
  value="WOLFSAGE/perl-5.27.3"
>5.27.3 DEV
  (WOLFSAGE on 2017-08-21)</option>
<option
  
  value="ARC/perl-5.27.2"
>5.27.2 DEV
  (ARC on 2017-07-20)</option>
<option
  
  value="SHAY/perl-5.24.2"
>5.24.2
  (SHAY on 2017-07-15)</option>
<option
  
  value="SHAY/perl-5.22.4-RC1"
>5.22.4-RC1 DEV
  (SHAY on 2017-07-01)</option>
<option
  
  value="EHERMAN/perl-5.27.1"
>5.27.1 DEV
  (EHERMAN on 2017-06-20)</option>
<option
  
  value="XSAWYERX/perl-5.26.0"
>5.26.0
  (XSAWYERX on 2017-05-30)</option>
<option
  
  value="RENEEB/perl-5.25.10"
>5.25.10 DEV
  (RENEEB on 2017-02-20)</option>
<option
  
  value="ABIGAIL/perl-5.25.9"
>5.25.9 DEV
  (ABIGAIL on 2017-01-20)</option>
<option
  
  value="SHAY/perl-5.22.3"
>5.22.3
  (SHAY on 2017-01-14)</option>
<option
  
  value="EXODIST/perl-5.25.7"
>5.25.7 DEV
  (EXODIST on 2016-11-20)</option>
<option
  
  value="ARC/perl-5.25.6"
>5.25.6 DEV
  (ARC on 2016-10-20)</option>
<option
  
  value="STEVAN/perl-5.25.5"
>5.25.5 DEV
  (STEVAN on 2016-09-20)</option>
<option
  
  value="BINGOS/perl-5.25.4"
>5.25.4 DEV
  (BINGOS on 2016-08-20)</option>
<option
  
  value="WOLFSAGE/perl-5.25.2"
>5.25.2 DEV
  (WOLFSAGE on 2016-06-20)</option>
<option
  
  value="RJBS/perl-5.24.0"
>5.24.0
  (RJBS on 2016-05-09)</option>
<option
  
  value="ABIGAIL/perl-5.23.9"
>5.23.9 DEV
  (ABIGAIL on 2016-03-20)</option>
<option
  
  value="STEVAN/perl-5.23.7"
>5.23.7 DEV
  (STEVAN on 2016-01-20)</option>
<option
  
  value="DAGOLDEN/perl-5.23.6"
>5.23.6 DEV
  (DAGOLDEN on 2015-12-21)</option>
<option
  
  value="SHAY/perl-5.22.1"
>5.22.1
  (SHAY on 2015-12-13)</option>
<option
  
  value="ABIGAIL/perl-5.23.5"
>5.23.5 DEV
  (ABIGAIL on 2015-11-20)</option>
<option
  
  value="PCM/perl-5.23.3"
>5.23.3 DEV
  (PCM on 2015-09-21)</option>
<option
  
  value="WOLFSAGE/perl-5.23.2"
>5.23.2 DEV
  (WOLFSAGE on 2015-08-20)</option>
<option
  
  value="WOLFSAGE/perl-5.23.1"
>5.23.1 DEV
  (WOLFSAGE on 2015-07-20)</option>
<option
  
  value="RJBS/perl-5.22.0"
>5.22.0
  (RJBS on 2015-06-01)</option>
<option
  
  value="RJBS/perl-5.22.0-RC2"
>5.22.0-RC2 DEV
  (RJBS on 2015-05-21)</option>
<option
  
  value="RJBS/perl-5.22.0-RC1"
>5.22.0-RC1 DEV
  (RJBS on 2015-05-19)</option>
<option
  
  value="WOLFSAGE/perl-5.21.8"
>5.21.8 DEV
  (WOLFSAGE on 2015-01-20)</option>
<option
  
  value="BINGOS/perl-5.21.6"
>5.21.6 DEV
  (BINGOS on 2014-11-20)</option>
<option
  
  value="ABIGAIL/perl-5.21.5"
>5.21.5 DEV
  (ABIGAIL on 2014-10-20)</option>
<option
  
  value="RJBS/perl-5.18.4"
>5.18.4
  (RJBS on 2014-10-02)</option>
<option
  
  value="RJBS/perl-5.18.3"
>5.18.3
  (RJBS on 2014-10-01)</option>
<option
  
  value="RJBS/perl-5.18.3-RC2"
>5.18.3-RC2 DEV
  (RJBS on 2014-09-27)</option>
<option
  
  value="RJBS/perl-5.18.3-RC1"
>5.18.3-RC1 DEV
  (RJBS on 2014-09-17)</option>
<option
  
  value="PCM/perl-5.21.3"
>5.21.3 DEV
  (PCM on 2014-08-21)</option>
<option
  
  value="ABIGAIL/perl-5.21.2"
>5.21.2 DEV
  (ABIGAIL on 2014-07-20)</option>
<option
  
  value="WOLFSAGE/perl-5.21.1"
>5.21.1 DEV
  (WOLFSAGE on 2014-06-20)</option>
<option
  
  value="RJBS/perl-5.20.0"
>5.20.0
  (RJBS on 2014-05-27)</option>
<option
  
  value="RJBS/perl-5.20.0-RC1"
>5.20.0-RC1 DEV
  (RJBS on 2014-05-17)</option>
<option
  
  value="ARC/perl-5.19.10"
>5.19.10 DEV
  (ARC on 2014-03-20)</option>
<option
  
  value="TONYC/perl-5.19.9"
>5.19.9 DEV
  (TONYC on 2014-02-20)</option>
<option
  
  value="RJBS/perl-5.18.2"
>5.18.2
  (RJBS on 2014-01-07)</option>
<option
  
  value="RJBS/perl-5.18.2-RC4"
>5.18.2-RC4 DEV
  (RJBS on 2013-12-22)</option>
<option
  
  value="ABIGAIL/perl-5.19.7"
>5.19.7 DEV
  (ABIGAIL on 2013-12-20)</option>
<option
  
  value="RJBS/perl-5.18.2-RC3"
>5.18.2-RC3 DEV
  (RJBS on 2013-12-19)</option>
<option
  
  value="RJBS/perl-5.18.2-RC2"
>5.18.2-RC2 DEV
  (RJBS on 2013-12-07)</option>
<option
  
  value="RJBS/perl-5.18.2-RC1"
>5.18.2-RC1 DEV
  (RJBS on 2013-12-02)</option>
<option
  
  value="BINGOS/perl-5.19.6"
>5.19.6 DEV
  (BINGOS on 2013-11-20)</option>
<option
  
  value="RJBS/perl-5.18.1"
>5.18.1
  (RJBS on 2013-08-12)</option>
<option
  
  value="RJBS/perl-5.18.1-RC3"
>5.18.1-RC3 DEV
  (RJBS on 2013-08-09)</option>
<option
  
  value="RJBS/perl-5.18.1-RC2"
>5.18.1-RC2 DEV
  (RJBS on 2013-08-04)</option>
<option
  
  value="RJBS/perl-5.18.1-RC1"
>5.18.1-RC1 DEV
  (RJBS on 2013-08-02)</option>
<option
  
  value="DAGOLDEN/perl-5.19.1"
>5.19.1 DEV
  (DAGOLDEN on 2013-06-21)</option>
<option
  
  value="RJBS/perl-5.18.0"
>5.18.0
  (RJBS on 2013-05-18)</option>
<option
  
  value="RJBS/perl-5.18.0-RC4"
>5.18.0-RC4 DEV
  (RJBS on 2013-05-16)</option>
<option
  
  value="RJBS/perl-5.18.0-RC3"
>5.18.0-RC3 DEV
  (RJBS on 2013-05-14)</option>
<option
  
  value="RJBS/perl-5.18.0-RC2"
>5.18.0-RC2 DEV
  (RJBS on 2013-05-12)</option>
<option
  
  value="RJBS/perl-5.18.0-RC1"
>5.18.0-RC1 DEV
  (RJBS on 2013-05-11)</option>
<option
  
  value="RJBS/perl-5.16.3"
>5.16.3
  (RJBS on 2013-03-11)</option>
<option
  
  value="DAPM/perl-5.14.4"
>5.14.4
  (DAPM on 2013-03-10)</option>
<option
  
  value="DAPM/perl-5.14.4-RC2"
>5.14.4-RC2 DEV
  (DAPM on 2013-03-07)</option>
<option
  
  value="RJBS/perl-5.16.3-RC1"
>5.16.3-RC1 DEV
  (RJBS on 2013-03-07)</option>
<option
  
  value="DAPM/perl-5.14.4-RC1"
>5.14.4-RC1 DEV
  (DAPM on 2013-03-05)</option>
<option
  
  value="BINGOS/perl-5.17.9"
>5.17.9 DEV
  (BINGOS on 2013-02-20)</option>
<option
  
  value="ARC/perl-5.17.8"
>5.17.8 DEV
  (ARC on 2013-01-20)</option>
<option
  
  value="DROLSKY/perl-5.17.7"
>5.17.7 DEV
  (DROLSKY on 2012-12-18)</option>
<option
  
  value="DOM/perl-5.12.5"
>5.12.5
  (DOM on 2012-11-10)</option>
<option
  
  value="DOM/perl-5.12.5-RC2"
>5.12.5-RC2 DEV
  (DOM on 2012-11-08)</option>
<option
  
  value="DOM/perl-5.12.5-RC1"
>5.12.5-RC1 DEV
  (DOM on 2012-11-03)</option>
<option
  
  value="RJBS/perl-5.16.2"
>5.16.2
  (RJBS on 2012-11-01)</option>
<option
  
  value="RJBS/perl-5.16.2-RC1"
>5.16.2-RC1 DEV
  (RJBS on 2012-10-27)</option>
<option
  
  value="FLORA/perl-5.17.5"
>5.17.5 DEV
  (FLORA on 2012-10-20)</option>
<option
  
  value="DOM/perl-5.14.3"
>5.14.3
  (DOM on 2012-10-12)</option>
<option
  
  value="DOM/perl-5.14.3-RC2"
>5.14.3-RC2 DEV
  (DOM on 2012-10-10)</option>
<option
  
  value="DOM/perl-5.14.3-RC1"
>5.14.3-RC1 DEV
  (DOM on 2012-09-26)</option>
<option
  
  value="FLORA/perl-5.17.4"
>5.17.4 DEV
  (FLORA on 2012-09-20)</option>
<option
  
  value="RJBS/perl-5.16.1"
>5.16.1
  (RJBS on 2012-08-08)</option>
<option
  
  value="RJBS/perl-5.16.1-RC1"
>5.16.1-RC1 DEV
  (RJBS on 2012-08-03)</option>
<option
  
  value="TONYC/perl-5.17.2"
>5.17.2 DEV
  (TONYC on 2012-07-20)</option>
<option
  
  value="DOY/perl-5.17.1"
>5.17.1 DEV
  (DOY on 2012-06-20)</option>
<option
  
  value="ZEFRAM/perl-5.17.0"
>5.17.0 DEV
  (ZEFRAM on 2012-05-26)</option>
<option
  
  value="RJBS/perl-5.16.0"
>5.16.0
  (RJBS on 2012-05-20)</option>
<option
  
  value="RJBS/perl-5.16.0-RC2"
>5.16.0-RC2 DEV
  (RJBS on 2012-05-16)</option>
<option
  
  value="RJBS/perl-5.16.0-RC1"
>5.16.0-RC1 DEV
  (RJBS on 2012-05-15)</option>
<option
  
  value="RJBS/perl-5.16.0-RC0"
>5.16.0-RC0 DEV
  (RJBS on 2012-05-11)</option>
<option
  
  value="ABIGAIL/perl-5.15.9"
>5.15.9 DEV
  (ABIGAIL on 2012-03-20)</option>
<option
  
  value="BINGOS/perl-5.15.7"
>5.15.7 DEV
  (BINGOS on 2012-01-20)</option>
<option
  
  value="DROLSKY/perl-5.15.6"
>5.15.6 DEV
  (DROLSKY on 2011-12-20)</option>
<option
  
  value="FLORA/perl-5.15.4"
>5.15.4 DEV
  (FLORA on 2011-10-20)</option>
<option
  
  value="FLORA/perl-5.14.2"
>5.14.2
  (FLORA on 2011-09-26)</option>
<option
  
  value="STEVAN/perl-5.15.3"
>5.15.3 DEV
  (STEVAN on 2011-09-21)</option>
<option
  
  value="FLORA/perl-5.14.2-RC1"
>5.14.2-RC1 DEV
  (FLORA on 2011-09-19)</option>
<option
  
  value="ZEFRAM/perl-5.15.1"
>5.15.1 DEV
  (ZEFRAM on 2011-07-20)</option>
<option
  
  value="DAGOLDEN/perl-5.15.0"
>5.15.0 DEV
  (DAGOLDEN on 2011-06-20)</option>
<option
  
  value="LBROCARD/perl-5.12.4"
>5.12.4
  (LBROCARD on 2011-06-20)</option>
<option
  
  value="JESSE/perl-5.14.1"
>5.14.1
  (JESSE on 2011-06-17)</option>
<option
  
  value="LBROCARD/perl-5.12.4-RC2"
>5.12.4-RC2 DEV
  (LBROCARD on 2011-06-15)</option>
<option
  
  value="JESSE/perl-5.14.1-RC1"
>5.14.1-RC1 DEV
  (JESSE on 2011-06-09)</option>
<option
  
  value="LBROCARD/perl-5.12.4-RC1"
>5.12.4-RC1 DEV
  (LBROCARD on 2011-06-08)</option>
<option
  
  value="JESSE/perl-5.14.0"
>5.14.0
  (JESSE on 2011-05-14)</option>
<option
  
  value="JESSE/perl-5.14.0-RC3"
>5.14.0-RC3 DEV
  (JESSE on 2011-05-11)</option>
<option
  
  value="JESSE/perl-5.14.0-RC2"
>5.14.0-RC2 DEV
  (JESSE on 2011-05-04)</option>
<option
  
  value="JESSE/perl-5.14.0-RC1"
>5.14.0-RC1 DEV
  (JESSE on 2011-04-20)</option>
<option
  
  value="FLORA/perl-5.13.11"
>5.13.11 DEV
  (FLORA on 2011-03-20)</option>
<option
  
  value="AVAR/perl-5.13.10"
>5.13.10 DEV
  (AVAR on 2011-02-20)</option>
<option
  
  value="RJBS/perl-5.12.3"
>5.12.3
  (RJBS on 2011-01-22)</option>
<option
  
  value="JESSE/perl-5.13.9"
>5.13.9 DEV
  (JESSE on 2011-01-21)</option>
<option
  
  value="RJBS/perl-5.12.3-RC3"
>5.12.3-RC3 DEV
  (RJBS on 2011-01-18)</option>
<option
  
  value="RJBS/perl-5.12.3-RC2"
>5.12.3-RC2 DEV
  (RJBS on 2011-01-15)</option>
<option
  
  value="RJBS/perl-5.12.3-RC1"
>5.12.3-RC1 DEV
  (RJBS on 2011-01-10)</option>
<option
  
  value="ZEFRAM/perl-5.13.8"
>5.13.8 DEV
  (ZEFRAM on 2010-12-19)</option>
<option
  
  value="BINGOS/perl-5.13.7"
>5.13.7 DEV
  (BINGOS on 2010-11-21)</option>
<option
  
  value="MIYAGAWA/perl-5.13.6"
>5.13.6 DEV
  (MIYAGAWA on 2010-10-21)</option>
<option
  
  value="JESSE/perl-5.12.2"
>5.12.2
  (JESSE on 2010-09-07)</option>
<option
  
  value="JESSE/perl-5.12.2-RC1"
>5.12.2-RC1 DEV
  (JESSE on 2010-08-31)</option>
<option
  
  value="FLORA/perl-5.13.4"
>5.13.4 DEV
  (FLORA on 2010-08-20)</option>
<option
  
  value="DAGOLDEN/perl-5.13.3"
>5.13.3 DEV
  (DAGOLDEN on 2010-07-20)</option>
<option
  
  value="MSTROUT/perl-5.13.2"
>5.13.2 DEV
  (MSTROUT on 2010-06-22)</option>
<option
  
  value="JESSE/perl-5.12.1"
>5.12.1
  (JESSE on 2010-05-16)</option>
<option
  
  value="JESSE/perl-5.12.1-RC2"
>5.12.1-RC2 DEV
  (JESSE on 2010-05-13)</option>
<option
  
  value="JESSE/perl-5.12.1-RC1"
>5.12.1-RC1 DEV
  (JESSE on 2010-05-10)</option>
<option
  
  value="LBROCARD/perl-5.13.0"
>5.13.0 DEV
  (LBROCARD on 2010-04-20)</option>
<option
  
  value="JESSE/perl-5.12.0"
>5.12.0
  (JESSE on 2010-04-12)</option>
<option
  
  value="JESSE/perl-5.12.0-RC5"
>5.12.0-RC5 DEV
  (JESSE on 2010-04-10)</option>
<option
  
  value="JESSE/perl-5.12.0-RC4"
>5.12.0-RC4 DEV
  (JESSE on 2010-04-07)</option>
<option
  
  value="JESSE/perl-5.12.0-RC3"
>5.12.0-RC3 DEV
  (JESSE on 2010-04-03)</option>
<option
  
  value="JESSE/perl-5.12.0-RC2"
>5.12.0-RC2 DEV
  (JESSE on 2010-04-01)</option>
<option
  
  value="JESSE/perl-5.12.0-RC1"
>5.12.0-RC1 DEV
  (JESSE on 2010-03-29)</option>
<option
  
  value="JESSE/perl-5.11.3"
>5.11.3 DEV
  (JESSE on 2009-12-21)</option>
<option
  
  value="LBROCARD/perl-5.11.2"
>5.11.2 DEV
  (LBROCARD on 2009-11-20)</option>
<option
  
  value="JESSE/perl-5.11.1"
>5.11.1 DEV
  (JESSE on 2009-10-20)</option>
<option
  
  value="JESSE/perl-5.11.0"
>5.11.0 DEV
  (JESSE on 2009-10-02)</option>
<option
  
  value="DAPM/perl-5.10.1"
>5.10.1
  (DAPM on 2009-08-23)</option>
<option
  
  value="DAPM/perl-5.10.1-RC2"
>5.10.1-RC2 DEV
  (DAPM on 2009-08-18)</option>
<option
  
  value="DAPM/perl-5.10.1-RC1"
>5.10.1-RC1 DEV
  (DAPM on 2009-08-06)</option>
<option
  
  value="NWCLARK/perl-5.8.9"
>5.8.9
  (NWCLARK on 2008-12-14)</option>
<option
  
  value="NWCLARK/perl-5.8.9-RC2"
>5.8.9-RC2 DEV
  (NWCLARK on 2008-12-06)</option>
<option
  
  value="NWCLARK/perl-5.8.9-RC1"
>5.8.9-RC1 DEV
  (NWCLARK on 2008-11-10)</option>
<option
  
  value="RGARCIA/perl-5.10.0"
>5.10.0
  (RGARCIA on 2007-12-18)</option>
<option
  
  value="RGARCIA/perl-5.9.5"
>5.9.5 DEV
  (RGARCIA on 2007-07-07)</option>
<option
  
  value="RGARCIA/perl-5.9.4"
>5.9.4 DEV
  (RGARCIA on 2006-08-15)</option>
<option
  
  value="NWCLARK/perl-5.8.8"
>5.8.8
  (NWCLARK on 2006-02-01)</option>
<option
  
  value="RGARCIA/perl-5.9.3"
>5.9.3 DEV
  (RGARCIA on 2006-01-28)</option>
<option
  
  value="NWCLARK/perl-5.8.8-RC1"
>5.8.8-RC1 DEV
  (NWCLARK on 2006-01-20)</option>
<option
  
  value="NWCLARK/perl-5.8.7"
>5.8.7
  (NWCLARK on 2005-05-30)</option>
<option
  
  value="NWCLARK/perl-5.8.7-RC1"
>5.8.7-RC1 DEV
  (NWCLARK on 2005-05-18)</option>
<option
  
  value="RGARCIA/perl-5.9.2"
>5.9.2 DEV
  (RGARCIA on 2005-04-01)</option>
<option
  
  value="NWCLARK/perl-5.8.6"
>5.8.6
  (NWCLARK on 2004-11-27)</option>
<option
  
  value="NWCLARK/perl-5.8.6-RC1"
>5.8.6-RC1 DEV
  (NWCLARK on 2004-11-11)</option>
<option
  
  value="NWCLARK/perl-5.8.5"
>5.8.5
  (NWCLARK on 2004-07-19)</option>
<option
  
  value="NWCLARK/perl-5.8.5-RC2"
>5.8.5-RC2 DEV
  (NWCLARK on 2004-07-08)</option>
<option
  
  value="NWCLARK/perl-5.8.5-RC1"
>5.8.5-RC1 DEV
  (NWCLARK on 2004-07-06)</option>
<option
  
  value="NWCLARK/perl-5.8.4"
>5.8.4
  (NWCLARK on 2004-04-21)</option>
<option
  
  value="NWCLARK/perl-5.8.4-RC2"
>5.8.4-RC2 DEV
  (NWCLARK on 2004-04-15)</option>
<option
  
  value="NWCLARK/perl-5.8.4-RC1"
>5.8.4-RC1 DEV
  (NWCLARK on 2004-04-05)</option>
<option
  
  value="RGARCIA/perl-5.9.1"
>5.9.1 DEV
  (RGARCIA on 2004-03-16)</option>
<option
  
  value="LBROCARD/perl5.005_04"
>5.005_04
  (LBROCARD on 2004-02-23)</option>
<option
  
  value="NWCLARK/perl-5.8.3"
>5.8.3
  (NWCLARK on 2004-01-14)</option>
<option
  
  value="NWCLARK/perl-5.8.3-RC1"
>5.8.3-RC1 DEV
  (NWCLARK on 2004-01-07)</option>
<option
  
  value="RGARCIA/perl-5.6.2"
>5.6.2
  (RGARCIA on 2003-11-15)</option>
<option
  
  value="NWCLARK/perl-5.8.2"
>5.8.2
  (NWCLARK on 2003-11-05)</option>
<option
  
  value="NWCLARK/perl-5.8.2-RC2"
>5.8.2-RC2 DEV
  (NWCLARK on 2003-11-03)</option>
<option
  
  value="NWCLARK/perl-5.8.2-RC1"
>5.8.2-RC1 DEV
  (NWCLARK on 2003-10-27)</option>
<option
  
  value="HVDS/perl-5.9.0"
>5.9.0 DEV
  (HVDS on 2003-10-27)</option>
<option
  
  value="JHI/perl-5.8.1"
>5.8.1
  (JHI on 2003-09-25)</option>
<option
  
  value="JHI/perl-5.8.0"
>5.8.0
  (JHI on 2002-07-18)</option>
<option
  
  value="JHI/perl-5.7.3"
>5.7.3 DEV
  (JHI on 2002-03-05)</option>
<option
  
  value="JHI/perl-5.7.2"
>5.7.2 DEV
  (JHI on 2001-07-13)</option>
<option
  
  value="GSAR/perl-5.6.1"
>5.6.1
  (GSAR on 2001-04-09)</option>
<option
  
  value="GSAR/perl-5.6.1-TRIAL3"
>5.6.1-TRIAL3 DEV
  (GSAR on 2001-03-19)</option>
<option
  
  value="GSAR/perl-5.6.1-TRIAL2"
>5.6.1-TRIAL2 DEV
  (GSAR on 2001-01-31)</option>
<option
  
  value="GSAR/perl-5.6.1-TRIAL1"
>5.6.1-TRIAL1 DEV
  (GSAR on 2000-12-18)</option>
<option
  
  value="JHI/perl-5.7.0"
>5.7.0 DEV
  (JHI on 2000-09-02)</option>
<option
  
  value="GSAR/perl-5.6.0"
>5.6.0
  (GSAR on 2000-03-23)</option>
<option
  
  value="CHIPS/perl5.004_05"
>5.004_05
  (CHIPS on 1999-04-29)</option>
<option
  
  value="GBARR/perl5.005_03"
>5.005_03
  (GBARR on 1999-03-29)</option>
<option
  
  value="GSAR/perl5.005_02"
>5.005_02
  (GSAR on 1998-08-08)</option>
<option
  
  value="GSAR/perl5.005_01"
>5.005_01
  (GSAR on 1998-07-27)</option>
<option
  
  value="GSAR/perl5.005"
>5.005
  (GSAR on 1998-07-23)</option>
<option
  
  value="TIMB/perl5.004_04"
>5.004_04
  (TIMB on 1997-10-15)</option>
<option
  
  value="TIMB/perl5.004_03"
>5.004_03
  (TIMB on 1997-09-05)</option>
<option
  
  value="TIMB/perl5.004_02"
>5.004_02
  (TIMB on 1997-08-07)</option>
<option
  
  value="TIMB/perl5.004_01"
>5.004_01
  (TIMB on 1997-06-13)</option>
<option
  
  value="CHIPS/perl5.004"
>5.004
  (CHIPS on 1997-05-15)</option>
<optgroup label="BackPAN">'
<option
  
  value="PEVANS/perl-5.38.1a"
>5.38.1a
  (PEVANS on 2023-11-25)</option>
<option
  
  value="PEVANS/perl-5.36.2a"
>5.36.2a
  (PEVANS on 2023-11-25)</option>
<option
  
  value="PEVANS/perl-5.34.2a"
>5.34.2a
  (PEVANS on 2023-11-25)</option>
<option
  
  value="PEVANS/perl-5.38.1"
>5.38.1
  (PEVANS on 2023-11-25)</option>
<option
  
  value="PEVANS/perl-5.36.2"
>5.36.2
  (PEVANS on 2023-11-25)</option>
<option
  
  value="PEVANS/perl-5.34.2"
>5.34.2
  (PEVANS on 2023-11-25)</option>
<option
  
  value="NEILB/perl-5.37.3"
>5.37.3 DEV
  (NEILB on 2022-08-20)</option>
<option
  
  value="NEILB/perl-5.35.7"
>5.35.7 DEV
  (NEILB on 2021-12-20)</option>
<option
  
  value="NEILB/perl-5.35.2"
>5.35.2 DEV
  (NEILB on 2021-07-23)</option>
<option
  
  value="TOMHUKINS/perl-5.33.4"
>5.33.4 DEV
  (TOMHUKINS on 2020-11-20)</option>
<option
  
  value="TOMHUKINS/perl-5.31.3"
>5.31.3 DEV
  (TOMHUKINS on 2019-08-20)</option>
<option
  
  value="SHAY/perl-5.26.1-RC1"
>5.26.1-RC1 DEV
  (SHAY on 2017-09-10)</option>
<option
  
  value="SHAY/perl-5.24.3-RC1"
>5.24.3-RC1 DEV
  (SHAY on 2017-09-10)</option>
<option
  
  value="SHAY/perl-5.22.4"
>5.22.4
  (SHAY on 2017-07-15)</option>
<option
  
  value="SHAY/perl-5.24.2-RC1"
>5.24.2-RC1 DEV
  (SHAY on 2017-07-01)</option>
<option
  
  value="XSAWYERX/perl-5.27.0"
>5.27.0 DEV
  (XSAWYERX on 2017-05-31)</option>
<option
  
  value="XSAWYERX/perl-5.26.0-RC2"
>5.26.0-RC2 DEV
  (XSAWYERX on 2017-05-23)</option>
<option
  
  value="XSAWYERX/perl-5.26.0-RC1"
>5.26.0-RC1 DEV
  (XSAWYERX on 2017-05-11)</option>
<option
  
  value="XSAWYERX/perl-5.25.12"
>5.25.12 DEV
  (XSAWYERX on 2017-04-20)</option>
<option
  
  value="XSAWYERX/perl-5.25.11"
>5.25.11 DEV
  (XSAWYERX on 2017-03-20)</option>
<option
  
  value="SHAY/perl-5.24.1"
>5.24.1
  (SHAY on 2017-01-14)</option>
<option
  
  value="SHAY/perl-5.24.1-RC5"
>5.24.1-RC5 DEV
  (SHAY on 2017-01-02)</option>
<option
  
  value="SHAY/perl-5.22.3-RC5"
>5.22.3-RC5 DEV
  (SHAY on 2017-01-02)</option>
<option
  
  value="XSAWYERX/perl-5.25.8"
>5.25.8 DEV
  (XSAWYERX on 2016-12-20)</option>
<option
  
  value="SHAY/perl-5.24.1-RC4"
>5.24.1-RC4 DEV
  (SHAY on 2016-10-12)</option>
<option
  
  value="SHAY/perl-5.22.3-RC4"
>5.22.3-RC4 DEV
  (SHAY on 2016-10-12)</option>
<option
  
  value="SHAY/perl-5.24.1-RC3"
>5.24.1-RC3 DEV
  (SHAY on 2016-08-11)</option>
<option
  
  value="SHAY/perl-5.22.3-RC3"
>5.22.3-RC3 DEV
  (SHAY on 2016-08-11)</option>
<option
  
  value="SHAY/perl-5.24.1-RC2"
>5.24.1-RC2 DEV
  (SHAY on 2016-07-25)</option>
<option
  
  value="SHAY/perl-5.22.3-RC2"
>5.22.3-RC2 DEV
  (SHAY on 2016-07-25)</option>
<option
  
  value="SHAY/perl-5.25.3"
>5.25.3 DEV
  (SHAY on 2016-07-20)</option>
<option
  
  value="SHAY/perl-5.24.1-RC1"
>5.24.1-RC1 DEV
  (SHAY on 2016-07-17)</option>
<option
  
  value="SHAY/perl-5.22.3-RC1"
>5.22.3-RC1 DEV
  (SHAY on 2016-07-17)</option>
<option
  
  value="XSAWYERX/perl-5.25.1"
>5.25.1 DEV
  (XSAWYERX on 2016-05-20)</option>
<option
  
  value="RJBS/perl-5.25.0"
>5.25.0 DEV
  (RJBS on 2016-05-09)</option>
<option
  
  value="RJBS/perl-5.24.0-RC5"
>5.24.0-RC5 DEV
  (RJBS on 2016-05-04)</option>
<option
  
  value="RJBS/perl-5.24.0-RC4"
>5.24.0-RC4 DEV
  (RJBS on 2016-05-02)</option>
<option
  
  value="SHAY/perl-5.22.2"
>5.22.2
  (SHAY on 2016-04-29)</option>
<option
  
  value="RJBS/perl-5.24.0-RC3"
>5.24.0-RC3 DEV
  (RJBS on 2016-04-27)</option>
<option
  
  value="RJBS/perl-5.24.0-RC2"
>5.24.0-RC2 DEV
  (RJBS on 2016-04-23)</option>
<option
  
  value="RJBS/perl-5.24.0-RC1"
>5.24.0-RC1 DEV
  (RJBS on 2016-04-14)</option>
<option
  
  value="SHAY/perl-5.22.2-RC1"
>5.22.2-RC1 DEV
  (SHAY on 2016-04-10)</option>
<option
  
  value="XSAWYERX/perl-5.23.8"
>5.23.8 DEV
  (XSAWYERX on 2016-02-20)</option>
<option
  
  value="SHAY/perl-5.22.1-RC4"
>5.22.1-RC4 DEV
  (SHAY on 2015-12-08)</option>
<option
  
  value="SHAY/perl-5.22.1-RC3"
>5.22.1-RC3 DEV
  (SHAY on 2015-12-02)</option>
<option
  
  value="SHAY/perl-5.22.1-RC2"
>5.22.1-RC2 DEV
  (SHAY on 2015-11-15)</option>
<option
  
  value="SHAY/perl-5.22.1-RC1"
>5.22.1-RC1 DEV
  (SHAY on 2015-10-31)</option>
<option
  
  value="SHAY/perl-5.23.4"
>5.23.4 DEV
  (SHAY on 2015-10-20)</option>
<option
  
  value="SHAY/perl-5.20.3"
>5.20.3
  (SHAY on 2015-09-12)</option>
<option
  
  value="SHAY/perl-5.20.3-RC2"
>5.20.3-RC2 DEV
  (SHAY on 2015-08-29)</option>
<option
  
  value="SHAY/perl-5.20.3-RC1"
>5.20.3-RC1 DEV
  (SHAY on 2015-08-22)</option>
<option
  
  value="RJBS/perl-5.23.0"
>5.23.0 DEV
  (RJBS on 2015-06-20)</option>
<option
  
  value="SHAY/perl-5.21.11"
>5.21.11 DEV
  (SHAY on 2015-04-20)</option>
<option
  
  value="SHAY/perl-5.21.10"
>5.21.10 DEV
  (SHAY on 2015-03-20)</option>
<option
  
  value="XSAWYERX/perl-5.21.9"
>5.21.9 DEV
  (XSAWYERX on 2015-02-21)</option>
<option
  
  value="SHAY/perl-5.20.2"
>5.20.2
  (SHAY on 2015-02-14)</option>
<option
  
  value="SHAY/perl-5.20.2-RC1"
>5.20.2-RC1 DEV
  (SHAY on 2015-02-01)</option>
<option
  
  value="CORION/perl-5.21.7"
>5.21.7 DEV
  (CORION on 2014-12-20)</option>
<option
  
  value="SHAY/perl-5.21.4"
>5.21.4 DEV
  (SHAY on 2014-09-20)</option>
<option
  
  value="SHAY/perl-5.20.1"
>5.20.1
  (SHAY on 2014-09-14)</option>
<option
  
  value="SHAY/perl-5.20.1-RC2"
>5.20.1-RC2 DEV
  (SHAY on 2014-09-07)</option>
<option
  
  value="SHAY/perl-5.20.1-RC1"
>5.20.1-RC1 DEV
  (SHAY on 2014-08-25)</option>
<option
  
  value="RJBS/perl-5.21.0"
>5.21.0 DEV
  (RJBS on 2014-05-27)</option>
<option
  
  value="SHAY/perl-5.19.11"
>5.19.11 DEV
  (SHAY on 2014-04-20)</option>
<option
  
  value="RJBS/perl-5.19.8"
>5.19.8 DEV
  (RJBS on 2014-01-20)</option>
<option
  
  value="SHAY/perl-5.19.5"
>5.19.5 DEV
  (SHAY on 2013-10-20)</option>
<option
  
  value="SHAY/perl-5.19.4"
>5.19.4 DEV
  (SHAY on 2013-09-20)</option>
<option
  
  value="SHAY/perl-5.19.3"
>5.19.3 DEV
  (SHAY on 2013-08-20)</option>
<option
  
  value="ARISTOTLE/perl-5.19.2"
>5.19.2 DEV
  (ARISTOTLE on 2013-07-22)</option>
<option
  
  value="RJBS/perl-5.19.0"
>5.19.0 DEV
  (RJBS on 2013-05-20)</option>
<option
  
  value="RJBS/perl-5.17.11"
>5.17.11 DEV
  (RJBS on 2013-04-21)</option>
<option
  
  value="CORION/perl-5.17.10"
>5.17.10 DEV
  (CORION on 2013-03-21)</option>
<option
  
  value="RJBS/perl-5.17.6"
>5.17.6 DEV
  (RJBS on 2012-11-21)</option>
<option
  
  value="SHAY/perl-5.17.3"
>5.17.3 DEV
  (SHAY on 2012-08-20)</option>
<option
  
  value="CORION/perl-5.15.8"
>5.15.8 DEV
  (CORION on 2012-02-20)</option>
<option
  
  value="SHAY/perl-5.15.5"
>5.15.5 DEV
  (SHAY on 2011-11-20)</option>
<option
  
  value="RJBS/perl-5.15.2"
>5.15.2 DEV
  (RJBS on 2011-08-21)</option>
<option
  
  value="SHAY/perl-5.13.5"
>5.13.5 DEV
  (SHAY on 2010-09-19)</option>
<option
  
  value="RJBS/perl-5.13.1"
>5.13.1 DEV
  (RJBS on 2010-05-20)</option>
<option
  
  value="JESSE/perl-5.12.0-RC0"
>5.12.0-RC0 DEV
  (JESSE on 2010-03-21)</option>
<option
  
  value="SHAY/perl-5.11.5"
>5.11.5 DEV
  (SHAY on 2010-02-21)</option>
<option
  
  value="RJBS/perl-5.11.4"
>5.11.4 DEV
  (RJBS on 2010-01-20)</option>
<option
  
  value="RGARCIA/perl-5.10.0-RC2"
>5.10.0-RC2 DEV
  (RGARCIA on 2007-11-25)</option>
<option
  
  value="RGARCIA/perl-5.10.0-RC1"
>5.10.0-RC1 DEV
  (RGARCIA on 2007-11-17)</option>
<option
  
  value="LBROCARD/perl5.005_04-RC2"
>5.005_04-RC2 DEV
  (LBROCARD on 2004-02-18)</option>
<option
  
  value="LBROCARD/perl5.005_04-RC1"
>5.005_04-RC1 DEV
  (LBROCARD on 2004-02-04)</option>
<option
  
  value="LBROCARD/perl5.005_03-MAINT22213"
>5.005_03-MAINT22213 DEV
  (LBROCARD on 2004-01-27)</option>
<option
  
  value="LBROCARD/perl5.005_03-MAINT22178"
>5.005_03-MAINT22178 DEV
  (LBROCARD on 2004-01-20)</option>
<option
  
  value="LBROCARD/perl5.005_03-MAINT21792"
>5.005_03-MAINT21792 DEV
  (LBROCARD on 2003-12-05)</option>
<option
  
  value="RGARCIA/perl-5.6.2-RC1"
>5.6.2-RC1 DEV
  (RGARCIA on 2003-11-08)</option>
<option
  
  value="JHI/perl-5.8.1-RC5"
>5.8.1-RC5 DEV
  (JHI on 2003-09-22)</option>
<option
  
  value="JHI/perl-5.8.1-RC4"
>5.8.1-RC4 DEV
  (JHI on 2003-08-01)</option>
<option
  
  value="JHI/perl-5.8.1-RC3"
>5.8.1-RC3 DEV
  (JHI on 2003-07-30)</option>
<option
  
  value="JHI/perl-5.8.1-RC2"
>5.8.1-RC2 DEV
  (JHI on 2003-07-11)</option>
<option
  
  value="JHI/perl-5.8.1-RC1"
>5.8.1-RC1 DEV
  (JHI on 2003-07-10)</option>
<option
  
  value="JHI/perl-5.8.0-RC3"
>5.8.0-RC3 DEV
  (JHI on 2002-07-14)</option>
<option
  
  value="JHI/perl-5.8.0-RC2"
>5.8.0-RC2 DEV
  (JHI on 2002-06-21)</option>
<option
  
  value="JHI/perl-5.8.0-RC1"
>5.8.0-RC1 DEV
  (JHI on 2002-06-01)</option>
<option
  
  value="JHI/perl-5.7.1"
>5.7.1 DEV
  (JHI on 2001-04-10)</option>
<option
  
  value="GSAR/perl-5.5.670"
>5.5.670 DEV
  (GSAR on 2000-03-01)</option>
<option
  
  value="GSAR/perl5.5.660"
>5.5.660 DEV
  (GSAR on 2000-02-22)</option>
<option
  
  value="GSAR/perl5.5.650"
>5.5.650 DEV
  (GSAR on 2000-02-08)</option>
<option
  
  value="GSAR/perl5.5.640"
>5.5.640 DEV
  (GSAR on 2000-02-02)</option>
<option
  
  value="GSAR/perl5.005_63"
>5.005_63 DEV
  (GSAR on 1999-12-09)</option>
<option
  
  value="GSAR/perl5.005_62"
>5.005_62 DEV
  (GSAR on 1999-10-15)</option>
<option
  
  value="GSAR/perl5.005_61"
>5.005_61 DEV
  (GSAR on 1999-08-22)</option>
<option
  
  value="GSAR/perl5.005_60"
>5.005_60 DEV
  (GSAR on 1999-08-02)</option>
<option
  
  value="GSAR/perl5.005_59"
>5.005_59 DEV
  (GSAR on 1999-08-02)</option>
<option
  
  value="GSAR/perl5.005_58"
>5.005_58 DEV
  (GSAR on 1999-07-27)</option>
<option
  
  value="GSAR/perl5.005_57"
>5.005_57 DEV
  (GSAR on 1999-05-25)</option>
<option
  
  value="CHIPS/perl5.004_05-MAINT_TRIAL_9"
>5.004_05-MAINT_TRIAL_9 DEV
  (CHIPS on 1999-04-27)</option>
<option
  
  value="GBARR/perl5.005_03-MAINT_TRIAL_6"
>5.005_03-MAINT_TRIAL_6 DEV
  (GBARR on 1999-03-05)</option>
<option
  
  value="GSAR/perl5.005_56"
>5.005_56 DEV
  (GSAR on 1999-03-01)</option>
<option
  
  value="GSAR/perl5.005_55"
>5.005_55 DEV
  (GSAR on 1999-02-16)</option>
<option
  
  value="GBARR/perl5.005_03-MAINT_TRIAL_5"
>5.005_03-MAINT_TRIAL_5 DEV
  (GBARR on 1999-01-29)</option>
<option
  
  value="GBARR/perl5.005_03-MAINT_TRIAL_4"
>5.005_03-MAINT_TRIAL_4 DEV
  (GBARR on 1999-01-26)</option>
<option
  
  value="GBARR/perl5.005_03-MAINT_TRIAL_3"
>5.005_03-MAINT_TRIAL_3 DEV
  (GBARR on 1999-01-17)</option>
<option
  
  value="GBARR/perl5.005_03-MAINT_TRIAL_2"
>5.005_03-MAINT_TRIAL_2 DEV
  (GBARR on 1999-01-03)</option>
<option
  
  value="TIMB/perl5.004_05-MAINT_TRIAL_8"
>5.004_05-MAINT_TRIAL_8 DEV
  (TIMB on 1998-12-03)</option>
<option
  
  value="GSAR/perl5.005_54"
>5.005_54 DEV
  (GSAR on 1998-11-30)</option>
<option
  
  value="GBARR/perl5.005_03-MAINT_TRIAL_1"
>5.005_03-MAINT_TRIAL_1 DEV
  (GBARR on 1998-11-30)</option>
<option
  
  value="TIMB/perl5.004_05-MAINT_TRIAL_7"
>5.004_05-MAINT_TRIAL_7 DEV
  (TIMB on 1998-11-22)</option>
<option
  
  value="GSAR/perl5.005_53"
>5.005_53 DEV
  (GSAR on 1998-10-31)</option>
<option
  
  value="TIMB/perl5.004_05-MAINT_TRIAL_6"
>5.004_05-MAINT_TRIAL_6 DEV
  (TIMB on 1998-10-09)</option>
<option
  
  value="GSAR/perl5.005_52"
>5.005_52 DEV
  (GSAR on 1998-09-25)</option>
<option
  
  value="GSAR/perl5.005_51"
>5.005_51 DEV
  (GSAR on 1998-08-10)</option>
<option
  
  value="GSAR/perl5.005_02-TRIAL2"
>5.005_02-TRIAL2 DEV
  (GSAR on 1998-08-05)</option>
<option
  
  value="GSAR/perl5.005_02-TRIAL1"
>5.005_02-TRIAL1 DEV
  (GSAR on 1998-08-02)</option>
<option
  
  value="GSAR/perl5.005_50"
>5.005_50 DEV
  (GSAR on 1998-07-26)</option>
<option
  
  value="GSAR/perl5.005-beta2"
>5.005-beta2
  (GSAR on 1998-07-21)</option>
<option
  
  value="TIMB/perl5.004_05-MAINT_TRIAL_5"
>5.004_05-MAINT_TRIAL_5 DEV
  (TIMB on 1998-07-21)</option>
<option
  
  value="GSAR/perl5.005-beta1"
>5.005-beta1
  (GSAR on 1998-07-15)</option>
<option
  
  value="GSAR/perl5.004_74"
>5.004_74 DEV
  (GSAR on 1998-07-14)</option>
<option
  
  value="GSAR/perl5.004_73"
>5.004_73 DEV
  (GSAR on 1998-07-13)</option>
<option
  
  value="GSAR/perl5.004_72"
>5.004_72 DEV
  (GSAR on 1998-07-12)</option>
<option
  
  value="GSAR/perl5.004_71"
>5.004_71 DEV
  (GSAR on 1998-07-09)</option>
<option
  
  value="GSAR/perl5.004_70"
>5.004_70 DEV
  (GSAR on 1998-07-06)</option>
<option
  
  value="GSAR/perl5.004_69"
>5.004_69 DEV
  (GSAR on 1998-06-29)</option>
<option
  
  value="GSAR/perl5.004_68"
>5.004_68 DEV
  (GSAR on 1998-06-23)</option>
<option
  
  value="GSAR/perl5.004_67"
>5.004_67 DEV
  (GSAR on 1998-06-15)</option>
<option
  
  value="MICB/perl5.004_66"
>5.004_66 DEV
  (MICB on 1998-05-29)</option>
<option
  
  value="TIMB/perl5.004_04-m4"
>5.004_04-m4 DEV
  (TIMB on 1998-05-19)</option>
<option
  
  value="TIMB/perl5.004_04-m3"
>5.004_04-m3 DEV
  (TIMB on 1998-05-15)</option>
<option
  
  value="MICB/perl5.004_65"
>5.004_65 DEV
  (MICB on 1998-05-15)</option>
<option
  
  value="TIMB/perl5.004_04-m2"
>5.004_04-m2 DEV
  (TIMB on 1998-05-01)</option>
<option
  
  value="MICB/perl5.004_64"
>5.004_64 DEV
  (MICB on 1998-04-03)</option>
<option
  
  value="MICB/perl5.004_63"
>5.004_63 DEV
  (MICB on 1998-03-17)</option>
<option
  
  value="MICB/perl5.004_62"
>5.004_62 DEV
  (MICB on 1998-03-06)</option>
<option
  
  value="TIMB/perl5.004m5t1"
>5.004m5t1
  (TIMB on 1998-03-04)</option>
<option
  
  value="MICB/perl5.004_61"
>5.004_61 DEV
  (MICB on 1998-02-27)</option>
<option
  
  value="MICB/perl5.004_60"
>5.004_60 DEV
  (MICB on 1998-02-20)</option>
<option
  
  value="MICB/perl5.004_59"
>5.004_59 DEV
  (MICB on 1998-02-13)</option>
<option
  
  value="MICB/perl5.004_58"
>5.004_58 DEV
  (MICB on 1998-02-06)</option>
<option
  
  value="MICB/perl5.004_57"
>5.004_57 DEV
  (MICB on 1998-02-03)</option>
<option
  
  value="MICB/perl5.004_56"
>5.004_56 DEV
  (MICB on 1997-12-18)</option>
<option
  
  value="MICB/perl5.004_55"
>5.004_55 DEV
  (MICB on 1997-11-25)</option>
<option
  
  value="MICB/perl5.004_54"
>5.004_54 DEV
  (MICB on 1997-11-14)</option>
<option
  
  value="MICB/perl5.004_53"
>5.004_53 DEV
  (MICB on 1997-10-16)</option>
<option
  
  value="MICB/perl5.004_52"
>5.004_52 DEV
  (MICB on 1997-10-15)</option>
<option
  
  value="TIMB/perl5.004m4t4"
>5.004m4t4
  (TIMB on 1997-10-14)</option>
<option
  
  value="TIMB/perl5.004m4t3"
>5.004m4t3
  (TIMB on 1997-10-09)</option>
<option
  
  value="MICB/perl5.004_51"
>5.004_51 DEV
  (MICB on 1997-10-02)</option>
<option
  
  value="TIMB/perl5.004m4t2"
>5.004m4t2
  (TIMB on 1997-09-23)</option>
<option
  
  value="TIMB/perl5.004m4t1"
>5.004m4t1
  (TIMB on 1997-09-19)</option>
<option
  
  value="TIMB/perl5.004m3t2"
>5.004m3t2
  (TIMB on 1997-09-05)</option>
<option
  
  value="CHIPS/perl5.003_99a"
>5.003_99a DEV
  (CHIPS on 1997-05-09)</option>
<option
  
  value="CHIPS/perl5.003_99"
>5.003_99 DEV
  (CHIPS on 1997-05-01)</option>
<option
  
  value="CHIPS/perl5.003_98"
>5.003_98 DEV
  (CHIPS on 1997-04-30)</option>
<option
  
  value="CHIPS/perl5.003_97j"
>5.003_97j DEV
  (CHIPS on 1997-04-28)</option>
<option
  
  value="CHIPS/perl5.003_97i"
>5.003_97i DEV
  (CHIPS on 1997-04-25)</option>
<option
  
  value="CHIPS/perl5.003_97h"
>5.003_97h DEV
  (CHIPS on 1997-04-24)</option>
<option
  
  value="CHIPS/perl5.003_97"
>5.003_97 DEV
  (CHIPS on 1997-04-03)</option>
<option
  
  value="CHIPS/perl5.003_96"
>5.003_96 DEV
  (CHIPS on 1997-04-01)</option>
<option
  
  value="CHIPS/perl5.003_95"
>5.003_95 DEV
  (CHIPS on 1997-03-25)</option>
<option
  
  value="CHIPS/perl5.003_94"
>5.003_94 DEV
  (CHIPS on 1997-03-22)</option>
<option
  
  value="CHIPS/perl5.003_93"
>5.003_93 DEV
  (CHIPS on 1997-03-10)</option>
<option
  
  value="CHIPS/perl5.003_92"
>5.003_92 DEV
  (CHIPS on 1997-03-06)</option>
<option
  
  value="CHIPS/perl5.003_91"
>5.003_91 DEV
  (CHIPS on 1997-03-01)</option>
<option
  
  value="CHIPS/perl5.003_90"
>5.003_90 DEV
  (CHIPS on 1997-02-25)</option>
<option
  
  value="CHIPS/perl5.003_28"
>5.003_28
  (CHIPS on 1997-02-21)</option>
<option
  
  value="CHIPS/perl5.003_27"
>5.003_27
  (CHIPS on 1997-02-18)</option>
<option
  
  value="CHIPS/perl5.003_26"
>5.003_26
  (CHIPS on 1997-02-10)</option>
<option
  
  value="CHIPS/perl5.003_25"
>5.003_25
  (CHIPS on 1997-02-04)</option>
<option
  
  value="CHIPS/perl5.003_24"
>5.003_24
  (CHIPS on 1997-01-29)</option>
<option
  
  value="CHIPS/perl5.003_23"
>5.003_23
  (CHIPS on 1997-01-25)</option>
<option
  
  value="CHIPS/perl5.003_22"
>5.003_22
  (CHIPS on 1997-01-16)</option>
<option
  
  value="CHIPS/perl5.003_21"
>5.003_21
  (CHIPS on 1997-01-15)</option>
<option
  
  value="CHIPS/perl5.003_20"
>5.003_20
  (CHIPS on 1997-01-08)</option>
<option
  
  value="CHIPS/perl5.003_19"
>5.003_19
  (CHIPS on 1997-01-04)</option>
<option
  
  value="CHIPS/perl5.003_18"
>5.003_18
  (CHIPS on 1996-12-31)</option>
<option
  
  value="CHIPS/perl5.003_17"
>5.003_17
  (CHIPS on 1996-12-27)</option>
<option
  
  value="CHIPS/perl5.003_16"
>5.003_16
  (CHIPS on 1996-12-24)</option>
<option
  
  value="CHIPS/perl5.003_15"
>5.003_15
  (CHIPS on 1996-12-23)</option>
<option
  
  value="CHIPS/perl-5.003_13"
>5.003_13
  (CHIPS on 1996-12-20)</option>
<option
  
  value="CHIPS/perl5.003_12"
>5.003_12
  (CHIPS on 1996-12-19)</option>
<option
  
  value="CHIPS/perl5.003_11"
>5.003_11
  (CHIPS on 1996-12-06)</option>
<option
  
  value="CHIPS/perl5.003_10"
>5.003_10
  (CHIPS on 1996-11-30)</option>
<option
  
  value="CHIPS/perl5.003_09"
>5.003_09
  (CHIPS on 1996-11-26)</option>
<option
  
  value="CHIPS/perl5.003_08"
>5.003_08
  (CHIPS on 1996-11-19)</option>
<option
  
  value="ANDYD/perl5.003_07"
>5.003_07
  (ANDYD on 1996-10-11)</option>
<option
  
  value="ANDYD/perl5.003_06"
>5.003_06
  (ANDYD on 1996-10-08)</option>
<option
  
  value="ANDYD/perl5.003_05"
>5.003_05
  (ANDYD on 1996-09-12)</option>
<option
  
  value="ANDYD/perl5.003_04"
>5.003_04
  (ANDYD on 1996-09-02)</option>
<option
  
  value="ANDYD/perl5.003_03"
>5.003_03
  (ANDYD on 1996-08-28)</option>
<option
  
  value="NI-S/perl5.003_02"
>5.003_02
  (NI-S on 1996-08-10)</option>
<option
  
  value="NI-S/perl5.003_02a"
>5.003_02a DEV
  (NI-S on 1996-08-08)</option>
<option
  
  value="LWALL/perl5.002b3"
>5.002b3
  (LWALL on 1996-02-03)</option>
</optgroup>
</select>
    </li>
    <li class="version-diff">
<select onchange="document.location.href='/release/PEVANS/perl-5.38.2/diff/' + encodeURIComponent(this.value) + '/pod/perlfunc.pod'
" class="form-control tool-bar-form">
  <option disabled selected>Diff with version</option>
<option
  
  value="CORION/perl-5.39.7"
>5.39.7 DEV
  (CORION on 2024-01-20)</option>
<option
  
  value="BOOK/perl-5.39.6"
>5.39.6 DEV
  (BOOK on 2023-12-30)</option>
<option
  disabled
  value="PEVANS/perl-5.38.2"
>5.38.2
  (PEVANS on 2023-11-29)</option>
<option
  
  value="PEVANS/perl-5.36.3"
>5.36.3
  (PEVANS on 2023-11-29)</option>
<option
  
  value="PEVANS/perl-5.34.3"
>5.34.3
  (PEVANS on 2023-11-29)</option>
<option
  
  value="ETHER/perl-5.39.5"
>5.39.5 DEV
  (ETHER on 2023-11-20)</option>
<option
  
  value="HAARG/perl-5.39.4"
>5.39.4 DEV
  (HAARG on 2023-10-25)</option>
<option
  
  value="WOLFSAGE/perl-5.39.3"
>5.39.3 DEV
  (WOLFSAGE on 2023-09-20)</option>
<option
  
  value="PEVANS/perl-5.39.2"
>5.39.2 DEV
  (PEVANS on 2023-08-20)</option>
<option
  
  value="SHAY/perl-5.39.1"
>5.39.1 DEV
  (SHAY on 2023-07-20)</option>
<option
  
  value="RJBS/perl-5.38.0"
>5.38.0
  (RJBS on 2023-07-02)</option>
<option
  
  value="RJBS/perl-5.38.0-RC2"
>5.38.0-RC2 DEV
  (RJBS on 2023-06-23)</option>
<option
  
  value="RJBS/perl-5.38.0-RC1"
>5.38.0-RC1 DEV
  (RJBS on 2023-06-16)</option>
<option
  
  value="SHAY/perl-5.36.1"
>5.36.1
  (SHAY on 2023-04-23)</option>
<option
  
  value="SHAY/perl-5.37.11"
>5.37.11 DEV
  (SHAY on 2023-04-20)</option>
<option
  
  value="SHAY/perl-5.36.1-RC3"
>5.36.1-RC3 DEV
  (SHAY on 2023-04-16)</option>
<option
  
  value="SHAY/perl-5.36.1-RC2"
>5.36.1-RC2 DEV
  (SHAY on 2023-04-11)</option>
<option
  
  value="SHAY/perl-5.36.1-RC1"
>5.36.1-RC1 DEV
  (SHAY on 2023-04-10)</option>
<option
  
  value="YVES/perl-5.37.10"
>5.37.10 DEV
  (YVES on 2023-03-21)</option>
<option
  
  value="ETHER/perl-5.37.9"
>5.37.9 DEV
  (ETHER on 2023-02-20)</option>
<option
  
  value="RENEEB/perl-5.37.8"
>5.37.8 DEV
  (RENEEB on 2023-01-20)</option>
<option
  
  value="HYDAHY/perl-5.37.7"
>5.37.7 DEV
  (HYDAHY on 2022-12-20)</option>
<option
  
  value="CORION/perl-5.37.6"
>5.37.6 DEV
  (CORION on 2022-11-20)</option>
<option
  
  value="TODDR/perl-5.37.5"
>5.37.5 DEV
  (TODDR on 2022-10-20)</option>
<option
  
  value="ETHER/perl-5.37.4"
>5.37.4 DEV
  (ETHER on 2022-09-21)</option>
<option
  
  value="ATOOMIC/perl-5.37.2"
>5.37.2 DEV
  (ATOOMIC on 2022-07-21)</option>
<option
  
  value="WOLFSAGE/perl-5.37.1"
>5.37.1 DEV
  (WOLFSAGE on 2022-06-20)</option>
<option
  
  value="RJBS/perl-5.37.0"
>5.37.0 DEV
  (RJBS on 2022-05-28)</option>
<option
  
  value="RJBS/perl-5.36.0"
>5.36.0
  (RJBS on 2022-05-28)</option>
<option
  
  value="RJBS/perl-5.36.0-RC3"
>5.36.0-RC3 DEV
  (RJBS on 2022-05-22)</option>
<option
  
  value="RJBS/perl-5.36.0-RC2"
>5.36.0-RC2 DEV
  (RJBS on 2022-05-21)</option>
<option
  
  value="SHAY/perl-5.35.11"
>5.35.11 DEV
  (SHAY on 2022-04-20)</option>
<option
  
  value="XSAWYERX/perl-5.35.10"
>5.35.10 DEV
  (XSAWYERX on 2022-03-20)</option>
<option
  
  value="SHAY/perl-5.34.1"
>5.34.1
  (SHAY on 2022-03-13)</option>
<option
  
  value="SHAY/perl-5.34.1-RC2"
>5.34.1-RC2 DEV
  (SHAY on 2022-03-06)</option>
<option
  
  value="SHAY/perl-5.34.1-RC1"
>5.34.1-RC1 DEV
  (SHAY on 2022-02-27)</option>
<option
  
  value="RENEEB/perl-5.35.9"
>5.35.9 DEV
  (RENEEB on 2022-02-20)</option>
<option
  
  value="ATOOMIC/perl-5.35.8"
>5.35.8 DEV
  (ATOOMIC on 2022-01-20)</option>
<option
  
  value="HYDAHY/perl-5.35.6"
>5.35.6 DEV
  (HYDAHY on 2021-11-21)</option>
<option
  
  value="LEONT/perl-5.35.5"
>5.35.5 DEV
  (LEONT on 2021-10-21)</option>
<option
  
  value="WOLFSAGE/perl-5.35.4"
>5.35.4 DEV
  (WOLFSAGE on 2021-09-20)</option>
<option
  
  value="ETHER/perl-5.35.3"
>5.35.3 DEV
  (ETHER on 2021-08-21)</option>
<option
  
  value="CORION/perl-5.35.1"
>5.35.1 DEV
  (CORION on 2021-06-20)</option>
<option
  
  value="RJBS/perl-5.35.0"
>5.35.0 DEV
  (RJBS on 2021-05-21)</option>
<option
  
  value="XSAWYERX/perl-5.34.0"
>5.34.0
  (XSAWYERX on 2021-05-20)</option>
<option
  
  value="XSAWYERX/perl-5.34.0-RC2"
>5.34.0-RC2 DEV
  (XSAWYERX on 2021-05-15)</option>
<option
  
  value="XSAWYERX/perl-5.34.0-RC1"
>5.34.0-RC1 DEV
  (XSAWYERX on 2021-05-04)</option>
<option
  
  value="TODDR/perl-5.33.9"
>5.33.9 DEV
  (TODDR on 2021-04-20)</option>
<option
  
  value="ATOOMIC/perl-5.33.8"
>5.33.8 DEV
  (ATOOMIC on 2021-03-21)</option>
<option
  
  value="RENEEB/perl-5.33.7"
>5.33.7 DEV
  (RENEEB on 2021-02-20)</option>
<option
  
  value="SHAY/perl-5.32.1"
>5.32.1
  (SHAY on 2021-01-23)</option>
<option
  
  value="HYDAHY/perl-5.33.6"
>5.33.6 DEV
  (HYDAHY on 2021-01-21)</option>
<option
  
  value="SHAY/perl-5.32.1-RC1"
>5.32.1-RC1 DEV
  (SHAY on 2021-01-09)</option>
<option
  
  value="CORION/perl-5.33.5"
>5.33.5 DEV
  (CORION on 2020-12-20)</option>
<option
  
  value="SHAY/perl-5.33.3"
>5.33.3 DEV
  (SHAY on 2020-10-20)</option>
<option
  
  value="XSAWYERX/perl-5.33.2"
>5.33.2 DEV
  (XSAWYERX on 2020-09-20)</option>
<option
  
  value="ETHER/perl-5.33.1"
>5.33.1 DEV
  (ETHER on 2020-08-20)</option>
<option
  
  value="XSAWYERX/perl-5.33.0"
>5.33.0 DEV
  (XSAWYERX on 2020-07-17)</option>
<option
  
  value="XSAWYERX/perl-5.32.0"
>5.32.0
  (XSAWYERX on 2020-06-20)</option>
<option
  
  value="XSAWYERX/perl-5.32.0-RC1"
>5.32.0-RC1 DEV
  (XSAWYERX on 2020-06-07)</option>
<option
  
  value="XSAWYERX/perl-5.30.3-RC1"
>5.30.3-RC1 DEV
  (XSAWYERX on 2020-06-01)</option>
<option
  
  value="XSAWYERX/perl-5.30.3"
>5.30.3
  (XSAWYERX on 2020-06-01)</option>
<option
  
  value="XSAWYERX/perl-5.28.3-RC1"
>5.28.3-RC1 DEV
  (XSAWYERX on 2020-06-01)</option>
<option
  
  value="XSAWYERX/perl-5.28.3"
>5.28.3
  (XSAWYERX on 2020-06-01)</option>
<option
  
  value="XSAWYERX/perl-5.32.0-RC0"
>5.32.0-RC0 DEV
  (XSAWYERX on 2020-05-30)</option>
<option
  
  value="XSAWYERX/perl-5.31.11"
>5.31.11 DEV
  (XSAWYERX on 2020-04-28)</option>
<option
  
  value="XSAWYERX/perl-5.31.10"
>5.31.10 DEV
  (XSAWYERX on 2020-03-20)</option>
<option
  
  value="SHAY/perl-5.30.2"
>5.30.2
  (SHAY on 2020-03-14)</option>
<option
  
  value="SHAY/perl-5.30.2-RC1"
>5.30.2-RC1 DEV
  (SHAY on 2020-02-29)</option>
<option
  
  value="RENEEB/perl-5.31.9"
>5.31.9 DEV
  (RENEEB on 2020-02-20)</option>
<option
  
  value="WOLFSAGE/perl-5.31.8"
>5.31.8 DEV
  (WOLFSAGE on 2020-01-20)</option>
<option
  
  value="ATOOMIC/perl-5.31.7"
>5.31.7 DEV
  (ATOOMIC on 2019-12-21)</option>
<option
  
  value="BINGOS/perl-5.31.6"
>5.31.6 DEV
  (BINGOS on 2019-11-20)</option>
<option
  
  value="SHAY/perl-5.30.1"
>5.30.1
  (SHAY on 2019-11-10)</option>
<option
  
  value="SHAY/perl-5.30.1-RC1"
>5.30.1-RC1 DEV
  (SHAY on 2019-10-27)</option>
<option
  
  value="SHAY/perl-5.31.5"
>5.31.5 DEV
  (SHAY on 2019-10-20)</option>
<option
  
  value="CORION/perl-5.31.4"
>5.31.4 DEV
  (CORION on 2019-09-20)</option>
<option
  
  value="SHAY/perl-5.31.2"
>5.31.2 DEV
  (SHAY on 2019-07-20)</option>
<option
  
  value="ETHER/perl-5.31.1"
>5.31.1 DEV
  (ETHER on 2019-06-20)</option>
<option
  
  value="XSAWYERX/perl-5.31.0"
>5.31.0 DEV
  (XSAWYERX on 2019-05-24)</option>
<option
  
  value="XSAWYERX/perl-5.30.0"
>5.30.0
  (XSAWYERX on 2019-05-22)</option>
<option
  
  value="XSAWYERX/perl-5.30.0-RC2"
>5.30.0-RC2 DEV
  (XSAWYERX on 2019-05-17)</option>
<option
  
  value="XSAWYERX/perl-5.30.0-RC1"
>5.30.0-RC1 DEV
  (XSAWYERX on 2019-05-11)</option>
<option
  
  value="XSAWYERX/perl-5.29.10"
>5.29.10 DEV
  (XSAWYERX on 2019-04-20)</option>
<option
  
  value="SHAY/perl-5.28.2"
>5.28.2
  (SHAY on 2019-04-19)</option>
<option
  
  value="SHAY/perl-5.28.2-RC1"
>5.28.2-RC1 DEV
  (SHAY on 2019-04-05)</option>
<option
  
  value="ZAKAME/perl-5.29.9"
>5.29.9 DEV
  (ZAKAME on 2019-03-21)</option>
<option
  
  value="ATOOMIC/perl-5.29.8"
>5.29.8 DEV
  (ATOOMIC on 2019-02-21)</option>
<option
  
  value="ABIGAIL/perl-5.29.7"
>5.29.7 DEV
  (ABIGAIL on 2019-01-20)</option>
<option
  
  value="ABIGAIL/perl-5.29.6"
>5.29.6 DEV
  (ABIGAIL on 2018-12-18)</option>
<option
  
  value="SHAY/perl-5.28.1-RC1"
>5.28.1-RC1 DEV
  (SHAY on 2018-11-30)</option>
<option
  
  value="SHAY/perl-5.26.3-RC1"
>5.26.3-RC1 DEV
  (SHAY on 2018-11-30)</option>
<option
  
  value="SHAY/perl-5.28.1"
>5.28.1
  (SHAY on 2018-11-29)</option>
<option
  
  value="SHAY/perl-5.26.3"
>5.26.3
  (SHAY on 2018-11-29)</option>
<option
  
  value="ETHER/perl-5.29.5"
>5.29.5 DEV
  (ETHER on 2018-11-20)</option>
<option
  
  value="ARC/perl-5.29.4"
>5.29.4 DEV
  (ARC on 2018-10-20)</option>
<option
  
  value="GENEHACK/perl-5.29.3"
>5.29.3 DEV
  (GENEHACK on 2018-09-21)</option>
<option
  
  value="BINGOS/perl-5.29.2"
>5.29.2 DEV
  (BINGOS on 2018-08-20)</option>
<option
  
  value="SHAY/perl-5.29.1"
>5.29.1 DEV
  (SHAY on 2018-07-20)</option>
<option
  
  value="XSAWYERX/perl-5.29.0"
>5.29.0 DEV
  (XSAWYERX on 2018-06-26)</option>
<option
  
  value="XSAWYERX/perl-5.28.0"
>5.28.0
  (XSAWYERX on 2018-06-23)</option>
<option
  
  value="XSAWYERX/perl-5.28.0-RC4"
>5.28.0-RC4 DEV
  (XSAWYERX on 2018-06-19)</option>
<option
  
  value="XSAWYERX/perl-5.28.0-RC3"
>5.28.0-RC3 DEV
  (XSAWYERX on 2018-06-18)</option>
<option
  
  value="XSAWYERX/perl-5.28.0-RC2"
>5.28.0-RC2 DEV
  (XSAWYERX on 2018-06-06)</option>
<option
  
  value="XSAWYERX/perl-5.28.0-RC1"
>5.28.0-RC1 DEV
  (XSAWYERX on 2018-05-21)</option>
<option
  
  value="XSAWYERX/perl-5.27.11"
>5.27.11 DEV
  (XSAWYERX on 2018-04-20)</option>
<option
  
  value="SHAY/perl-5.26.2"
>5.26.2
  (SHAY on 2018-04-14)</option>
<option
  
  value="SHAY/perl-5.24.4"
>5.24.4
  (SHAY on 2018-04-14)</option>
<option
  
  value="SHAY/perl-5.26.2-RC1"
>5.26.2-RC1 DEV
  (SHAY on 2018-03-24)</option>
<option
  
  value="SHAY/perl-5.24.4-RC1"
>5.24.4-RC1 DEV
  (SHAY on 2018-03-24)</option>
<option
  
  value="TODDR/perl-5.27.10"
>5.27.10 DEV
  (TODDR on 2018-03-20)</option>
<option
  
  value="RENEEB/perl-5.27.9"
>5.27.9 DEV
  (RENEEB on 2018-02-20)</option>
<option
  
  value="ABIGAIL/perl-5.27.8"
>5.27.8 DEV
  (ABIGAIL on 2018-01-20)</option>
<option
  
  value="BINGOS/perl-5.27.7"
>5.27.7 DEV
  (BINGOS on 2017-12-20)</option>
<option
  
  value="ETHER/perl-5.27.6"
>5.27.6 DEV
  (ETHER on 2017-11-20)</option>
<option
  
  value="SHAY/perl-5.27.5"
>5.27.5 DEV
  (SHAY on 2017-10-20)</option>
<option
  
  value="SHAY/perl-5.26.1"
>5.26.1
  (SHAY on 2017-09-22)</option>
<option
  
  value="SHAY/perl-5.24.3"
>5.24.3
  (SHAY on 2017-09-22)</option>
<option
  
  value="GENEHACK/perl-5.27.4"
>5.27.4 DEV
  (GENEHACK on 2017-09-20)</option>
<option
  
  value="WOLFSAGE/perl-5.27.3"
>5.27.3 DEV
  (WOLFSAGE on 2017-08-21)</option>
<option
  
  value="ARC/perl-5.27.2"
>5.27.2 DEV
  (ARC on 2017-07-20)</option>
<option
  
  value="SHAY/perl-5.24.2"
>5.24.2
  (SHAY on 2017-07-15)</option>
<option
  
  value="SHAY/perl-5.22.4-RC1"
>5.22.4-RC1 DEV
  (SHAY on 2017-07-01)</option>
<option
  
  value="EHERMAN/perl-5.27.1"
>5.27.1 DEV
  (EHERMAN on 2017-06-20)</option>
<option
  
  value="XSAWYERX/perl-5.26.0"
>5.26.0
  (XSAWYERX on 2017-05-30)</option>
<option
  
  value="RENEEB/perl-5.25.10"
>5.25.10 DEV
  (RENEEB on 2017-02-20)</option>
<option
  
  value="ABIGAIL/perl-5.25.9"
>5.25.9 DEV
  (ABIGAIL on 2017-01-20)</option>
<option
  
  value="SHAY/perl-5.22.3"
>5.22.3
  (SHAY on 2017-01-14)</option>
<option
  
  value="EXODIST/perl-5.25.7"
>5.25.7 DEV
  (EXODIST on 2016-11-20)</option>
<option
  
  value="ARC/perl-5.25.6"
>5.25.6 DEV
  (ARC on 2016-10-20)</option>
<option
  
  value="STEVAN/perl-5.25.5"
>5.25.5 DEV
  (STEVAN on 2016-09-20)</option>
<option
  
  value="BINGOS/perl-5.25.4"
>5.25.4 DEV
  (BINGOS on 2016-08-20)</option>
<option
  
  value="WOLFSAGE/perl-5.25.2"
>5.25.2 DEV
  (WOLFSAGE on 2016-06-20)</option>
<option
  
  value="RJBS/perl-5.24.0"
>5.24.0
  (RJBS on 2016-05-09)</option>
<option
  
  value="ABIGAIL/perl-5.23.9"
>5.23.9 DEV
  (ABIGAIL on 2016-03-20)</option>
<option
  
  value="STEVAN/perl-5.23.7"
>5.23.7 DEV
  (STEVAN on 2016-01-20)</option>
<option
  
  value="DAGOLDEN/perl-5.23.6"
>5.23.6 DEV
  (DAGOLDEN on 2015-12-21)</option>
<option
  
  value="SHAY/perl-5.22.1"
>5.22.1
  (SHAY on 2015-12-13)</option>
<option
  
  value="ABIGAIL/perl-5.23.5"
>5.23.5 DEV
  (ABIGAIL on 2015-11-20)</option>
<option
  
  value="PCM/perl-5.23.3"
>5.23.3 DEV
  (PCM on 2015-09-21)</option>
<option
  
  value="WOLFSAGE/perl-5.23.2"
>5.23.2 DEV
  (WOLFSAGE on 2015-08-20)</option>
<option
  
  value="WOLFSAGE/perl-5.23.1"
>5.23.1 DEV
  (WOLFSAGE on 2015-07-20)</option>
<option
  
  value="RJBS/perl-5.22.0"
>5.22.0
  (RJBS on 2015-06-01)</option>
<option
  
  value="RJBS/perl-5.22.0-RC2"
>5.22.0-RC2 DEV
  (RJBS on 2015-05-21)</option>
<option
  
  value="RJBS/perl-5.22.0-RC1"
>5.22.0-RC1 DEV
  (RJBS on 2015-05-19)</option>
<option
  
  value="WOLFSAGE/perl-5.21.8"
>5.21.8 DEV
  (WOLFSAGE on 2015-01-20)</option>
<option
  
  value="BINGOS/perl-5.21.6"
>5.21.6 DEV
  (BINGOS on 2014-11-20)</option>
<option
  
  value="ABIGAIL/perl-5.21.5"
>5.21.5 DEV
  (ABIGAIL on 2014-10-20)</option>
<option
  
  value="RJBS/perl-5.18.4"
>5.18.4
  (RJBS on 2014-10-02)</option>
<option
  
  value="RJBS/perl-5.18.3"
>5.18.3
  (RJBS on 2014-10-01)</option>
<option
  
  value="RJBS/perl-5.18.3-RC2"
>5.18.3-RC2 DEV
  (RJBS on 2014-09-27)</option>
<option
  
  value="RJBS/perl-5.18.3-RC1"
>5.18.3-RC1 DEV
  (RJBS on 2014-09-17)</option>
<option
  
  value="PCM/perl-5.21.3"
>5.21.3 DEV
  (PCM on 2014-08-21)</option>
<option
  
  value="ABIGAIL/perl-5.21.2"
>5.21.2 DEV
  (ABIGAIL on 2014-07-20)</option>
<option
  
  value="WOLFSAGE/perl-5.21.1"
>5.21.1 DEV
  (WOLFSAGE on 2014-06-20)</option>
<option
  
  value="RJBS/perl-5.20.0"
>5.20.0
  (RJBS on 2014-05-27)</option>
<option
  
  value="RJBS/perl-5.20.0-RC1"
>5.20.0-RC1 DEV
  (RJBS on 2014-05-17)</option>
<option
  
  value="ARC/perl-5.19.10"
>5.19.10 DEV
  (ARC on 2014-03-20)</option>
<option
  
  value="TONYC/perl-5.19.9"
>5.19.9 DEV
  (TONYC on 2014-02-20)</option>
<option
  
  value="RJBS/perl-5.18.2"
>5.18.2
  (RJBS on 2014-01-07)</option>
<option
  
  value="RJBS/perl-5.18.2-RC4"
>5.18.2-RC4 DEV
  (RJBS on 2013-12-22)</option>
<option
  
  value="ABIGAIL/perl-5.19.7"
>5.19.7 DEV
  (ABIGAIL on 2013-12-20)</option>
<option
  
  value="RJBS/perl-5.18.2-RC3"
>5.18.2-RC3 DEV
  (RJBS on 2013-12-19)</option>
<option
  
  value="RJBS/perl-5.18.2-RC2"
>5.18.2-RC2 DEV
  (RJBS on 2013-12-07)</option>
<option
  
  value="RJBS/perl-5.18.2-RC1"
>5.18.2-RC1 DEV
  (RJBS on 2013-12-02)</option>
<option
  
  value="BINGOS/perl-5.19.6"
>5.19.6 DEV
  (BINGOS on 2013-11-20)</option>
<option
  
  value="RJBS/perl-5.18.1"
>5.18.1
  (RJBS on 2013-08-12)</option>
<option
  
  value="RJBS/perl-5.18.1-RC3"
>5.18.1-RC3 DEV
  (RJBS on 2013-08-09)</option>
<option
  
  value="RJBS/perl-5.18.1-RC2"
>5.18.1-RC2 DEV
  (RJBS on 2013-08-04)</option>
<option
  
  value="RJBS/perl-5.18.1-RC1"
>5.18.1-RC1 DEV
  (RJBS on 2013-08-02)</option>
<option
  
  value="DAGOLDEN/perl-5.19.1"
>5.19.1 DEV
  (DAGOLDEN on 2013-06-21)</option>
<option
  
  value="RJBS/perl-5.18.0"
>5.18.0
  (RJBS on 2013-05-18)</option>
<option
  
  value="RJBS/perl-5.18.0-RC4"
>5.18.0-RC4 DEV
  (RJBS on 2013-05-16)</option>
<option
  
  value="RJBS/perl-5.18.0-RC3"
>5.18.0-RC3 DEV
  (RJBS on 2013-05-14)</option>
<option
  
  value="RJBS/perl-5.18.0-RC2"
>5.18.0-RC2 DEV
  (RJBS on 2013-05-12)</option>
<option
  
  value="RJBS/perl-5.18.0-RC1"
>5.18.0-RC1 DEV
  (RJBS on 2013-05-11)</option>
<option
  
  value="RJBS/perl-5.16.3"
>5.16.3
  (RJBS on 2013-03-11)</option>
<option
  
  value="DAPM/perl-5.14.4"
>5.14.4
  (DAPM on 2013-03-10)</option>
<option
  
  value="DAPM/perl-5.14.4-RC2"
>5.14.4-RC2 DEV
  (DAPM on 2013-03-07)</option>
<option
  
  value="RJBS/perl-5.16.3-RC1"
>5.16.3-RC1 DEV
  (RJBS on 2013-03-07)</option>
<option
  
  value="DAPM/perl-5.14.4-RC1"
>5.14.4-RC1 DEV
  (DAPM on 2013-03-05)</option>
<option
  
  value="BINGOS/perl-5.17.9"
>5.17.9 DEV
  (BINGOS on 2013-02-20)</option>
<option
  
  value="ARC/perl-5.17.8"
>5.17.8 DEV
  (ARC on 2013-01-20)</option>
<option
  
  value="DROLSKY/perl-5.17.7"
>5.17.7 DEV
  (DROLSKY on 2012-12-18)</option>
<option
  
  value="DOM/perl-5.12.5"
>5.12.5
  (DOM on 2012-11-10)</option>
<option
  
  value="DOM/perl-5.12.5-RC2"
>5.12.5-RC2 DEV
  (DOM on 2012-11-08)</option>
<option
  
  value="DOM/perl-5.12.5-RC1"
>5.12.5-RC1 DEV
  (DOM on 2012-11-03)</option>
<option
  
  value="RJBS/perl-5.16.2"
>5.16.2
  (RJBS on 2012-11-01)</option>
<option
  
  value="RJBS/perl-5.16.2-RC1"
>5.16.2-RC1 DEV
  (RJBS on 2012-10-27)</option>
<option
  
  value="FLORA/perl-5.17.5"
>5.17.5 DEV
  (FLORA on 2012-10-20)</option>
<option
  
  value="DOM/perl-5.14.3"
>5.14.3
  (DOM on 2012-10-12)</option>
<option
  
  value="DOM/perl-5.14.3-RC2"
>5.14.3-RC2 DEV
  (DOM on 2012-10-10)</option>
<option
  
  value="DOM/perl-5.14.3-RC1"
>5.14.3-RC1 DEV
  (DOM on 2012-09-26)</option>
<option
  
  value="FLORA/perl-5.17.4"
>5.17.4 DEV
  (FLORA on 2012-09-20)</option>
<option
  
  value="RJBS/perl-5.16.1"
>5.16.1
  (RJBS on 2012-08-08)</option>
<option
  
  value="RJBS/perl-5.16.1-RC1"
>5.16.1-RC1 DEV
  (RJBS on 2012-08-03)</option>
<option
  
  value="TONYC/perl-5.17.2"
>5.17.2 DEV
  (TONYC on 2012-07-20)</option>
<option
  
  value="DOY/perl-5.17.1"
>5.17.1 DEV
  (DOY on 2012-06-20)</option>
<option
  
  value="ZEFRAM/perl-5.17.0"
>5.17.0 DEV
  (ZEFRAM on 2012-05-26)</option>
<option
  
  value="RJBS/perl-5.16.0"
>5.16.0
  (RJBS on 2012-05-20)</option>
<option
  
  value="RJBS/perl-5.16.0-RC2"
>5.16.0-RC2 DEV
  (RJBS on 2012-05-16)</option>
<option
  
  value="RJBS/perl-5.16.0-RC1"
>5.16.0-RC1 DEV
  (RJBS on 2012-05-15)</option>
<option
  
  value="RJBS/perl-5.16.0-RC0"
>5.16.0-RC0 DEV
  (RJBS on 2012-05-11)</option>
<option
  
  value="ABIGAIL/perl-5.15.9"
>5.15.9 DEV
  (ABIGAIL on 2012-03-20)</option>
<option
  
  value="BINGOS/perl-5.15.7"
>5.15.7 DEV
  (BINGOS on 2012-01-20)</option>
<option
  
  value="DROLSKY/perl-5.15.6"
>5.15.6 DEV
  (DROLSKY on 2011-12-20)</option>
<option
  
  value="FLORA/perl-5.15.4"
>5.15.4 DEV
  (FLORA on 2011-10-20)</option>
<option
  
  value="FLORA/perl-5.14.2"
>5.14.2
  (FLORA on 2011-09-26)</option>
<option
  
  value="STEVAN/perl-5.15.3"
>5.15.3 DEV
  (STEVAN on 2011-09-21)</option>
<option
  
  value="FLORA/perl-5.14.2-RC1"
>5.14.2-RC1 DEV
  (FLORA on 2011-09-19)</option>
<option
  
  value="ZEFRAM/perl-5.15.1"
>5.15.1 DEV
  (ZEFRAM on 2011-07-20)</option>
<option
  
  value="DAGOLDEN/perl-5.15.0"
>5.15.0 DEV
  (DAGOLDEN on 2011-06-20)</option>
<option
  
  value="LBROCARD/perl-5.12.4"
>5.12.4
  (LBROCARD on 2011-06-20)</option>
<option
  
  value="JESSE/perl-5.14.1"
>5.14.1
  (JESSE on 2011-06-17)</option>
<option
  
  value="LBROCARD/perl-5.12.4-RC2"
>5.12.4-RC2 DEV
  (LBROCARD on 2011-06-15)</option>
<option
  
  value="JESSE/perl-5.14.1-RC1"
>5.14.1-RC1 DEV
  (JESSE on 2011-06-09)</option>
<option
  
  value="LBROCARD/perl-5.12.4-RC1"
>5.12.4-RC1 DEV
  (LBROCARD on 2011-06-08)</option>
<option
  
  value="JESSE/perl-5.14.0"
>5.14.0
  (JESSE on 2011-05-14)</option>
<option
  
  value="JESSE/perl-5.14.0-RC3"
>5.14.0-RC3 DEV
  (JESSE on 2011-05-11)</option>
<option
  
  value="JESSE/perl-5.14.0-RC2"
>5.14.0-RC2 DEV
  (JESSE on 2011-05-04)</option>
<option
  
  value="JESSE/perl-5.14.0-RC1"
>5.14.0-RC1 DEV
  (JESSE on 2011-04-20)</option>
<option
  
  value="FLORA/perl-5.13.11"
>5.13.11 DEV
  (FLORA on 2011-03-20)</option>
<option
  
  value="AVAR/perl-5.13.10"
>5.13.10 DEV
  (AVAR on 2011-02-20)</option>
<option
  
  value="RJBS/perl-5.12.3"
>5.12.3
  (RJBS on 2011-01-22)</option>
<option
  
  value="JESSE/perl-5.13.9"
>5.13.9 DEV
  (JESSE on 2011-01-21)</option>
<option
  
  value="RJBS/perl-5.12.3-RC3"
>5.12.3-RC3 DEV
  (RJBS on 2011-01-18)</option>
<option
  
  value="RJBS/perl-5.12.3-RC2"
>5.12.3-RC2 DEV
  (RJBS on 2011-01-15)</option>
<option
  
  value="RJBS/perl-5.12.3-RC1"
>5.12.3-RC1 DEV
  (RJBS on 2011-01-10)</option>
<option
  
  value="ZEFRAM/perl-5.13.8"
>5.13.8 DEV
  (ZEFRAM on 2010-12-19)</option>
<option
  
  value="BINGOS/perl-5.13.7"
>5.13.7 DEV
  (BINGOS on 2010-11-21)</option>
<option
  
  value="MIYAGAWA/perl-5.13.6"
>5.13.6 DEV
  (MIYAGAWA on 2010-10-21)</option>
<option
  
  value="JESSE/perl-5.12.2"
>5.12.2
  (JESSE on 2010-09-07)</option>
<option
  
  value="JESSE/perl-5.12.2-RC1"
>5.12.2-RC1 DEV
  (JESSE on 2010-08-31)</option>
<option
  
  value="FLORA/perl-5.13.4"
>5.13.4 DEV
  (FLORA on 2010-08-20)</option>
<option
  
  value="DAGOLDEN/perl-5.13.3"
>5.13.3 DEV
  (DAGOLDEN on 2010-07-20)</option>
<option
  
  value="MSTROUT/perl-5.13.2"
>5.13.2 DEV
  (MSTROUT on 2010-06-22)</option>
<option
  
  value="JESSE/perl-5.12.1"
>5.12.1
  (JESSE on 2010-05-16)</option>
<option
  
  value="JESSE/perl-5.12.1-RC2"
>5.12.1-RC2 DEV
  (JESSE on 2010-05-13)</option>
<option
  
  value="JESSE/perl-5.12.1-RC1"
>5.12.1-RC1 DEV
  (JESSE on 2010-05-10)</option>
<option
  
  value="LBROCARD/perl-5.13.0"
>5.13.0 DEV
  (LBROCARD on 2010-04-20)</option>
<option
  
  value="JESSE/perl-5.12.0"
>5.12.0
  (JESSE on 2010-04-12)</option>
<option
  
  value="JESSE/perl-5.12.0-RC5"
>5.12.0-RC5 DEV
  (JESSE on 2010-04-10)</option>
<option
  
  value="JESSE/perl-5.12.0-RC4"
>5.12.0-RC4 DEV
  (JESSE on 2010-04-07)</option>
<option
  
  value="JESSE/perl-5.12.0-RC3"
>5.12.0-RC3 DEV
  (JESSE on 2010-04-03)</option>
<option
  
  value="JESSE/perl-5.12.0-RC2"
>5.12.0-RC2 DEV
  (JESSE on 2010-04-01)</option>
<option
  
  value="JESSE/perl-5.12.0-RC1"
>5.12.0-RC1 DEV
  (JESSE on 2010-03-29)</option>
<option
  
  value="JESSE/perl-5.11.3"
>5.11.3 DEV
  (JESSE on 2009-12-21)</option>
<option
  
  value="LBROCARD/perl-5.11.2"
>5.11.2 DEV
  (LBROCARD on 2009-11-20)</option>
<option
  
  value="JESSE/perl-5.11.1"
>5.11.1 DEV
  (JESSE on 2009-10-20)</option>
<option
  
  value="JESSE/perl-5.11.0"
>5.11.0 DEV
  (JESSE on 2009-10-02)</option>
<option
  
  value="DAPM/perl-5.10.1"
>5.10.1
  (DAPM on 2009-08-23)</option>
<option
  
  value="DAPM/perl-5.10.1-RC2"
>5.10.1-RC2 DEV
  (DAPM on 2009-08-18)</option>
<option
  
  value="DAPM/perl-5.10.1-RC1"
>5.10.1-RC1 DEV
  (DAPM on 2009-08-06)</option>
<option
  
  value="NWCLARK/perl-5.8.9"
>5.8.9
  (NWCLARK on 2008-12-14)</option>
<option
  
  value="NWCLARK/perl-5.8.9-RC2"
>5.8.9-RC2 DEV
  (NWCLARK on 2008-12-06)</option>
<option
  
  value="NWCLARK/perl-5.8.9-RC1"
>5.8.9-RC1 DEV
  (NWCLARK on 2008-11-10)</option>
<option
  
  value="RGARCIA/perl-5.10.0"
>5.10.0
  (RGARCIA on 2007-12-18)</option>
<option
  
  value="RGARCIA/perl-5.9.5"
>5.9.5 DEV
  (RGARCIA on 2007-07-07)</option>
<option
  
  value="RGARCIA/perl-5.9.4"
>5.9.4 DEV
  (RGARCIA on 2006-08-15)</option>
<option
  
  value="NWCLARK/perl-5.8.8"
>5.8.8
  (NWCLARK on 2006-02-01)</option>
<option
  
  value="RGARCIA/perl-5.9.3"
>5.9.3 DEV
  (RGARCIA on 2006-01-28)</option>
<option
  
  value="NWCLARK/perl-5.8.8-RC1"
>5.8.8-RC1 DEV
  (NWCLARK on 2006-01-20)</option>
<option
  
  value="NWCLARK/perl-5.8.7"
>5.8.7
  (NWCLARK on 2005-05-30)</option>
<option
  
  value="NWCLARK/perl-5.8.7-RC1"
>5.8.7-RC1 DEV
  (NWCLARK on 2005-05-18)</option>
<option
  
  value="RGARCIA/perl-5.9.2"
>5.9.2 DEV
  (RGARCIA on 2005-04-01)</option>
<option
  
  value="NWCLARK/perl-5.8.6"
>5.8.6
  (NWCLARK on 2004-11-27)</option>
<option
  
  value="NWCLARK/perl-5.8.6-RC1"
>5.8.6-RC1 DEV
  (NWCLARK on 2004-11-11)</option>
<option
  
  value="NWCLARK/perl-5.8.5"
>5.8.5
  (NWCLARK on 2004-07-19)</option>
<option
  
  value="NWCLARK/perl-5.8.5-RC2"
>5.8.5-RC2 DEV
  (NWCLARK on 2004-07-08)</option>
<option
  
  value="NWCLARK/perl-5.8.5-RC1"
>5.8.5-RC1 DEV
  (NWCLARK on 2004-07-06)</option>
<option
  
  value="NWCLARK/perl-5.8.4"
>5.8.4
  (NWCLARK on 2004-04-21)</option>
<option
  
  value="NWCLARK/perl-5.8.4-RC2"
>5.8.4-RC2 DEV
  (NWCLARK on 2004-04-15)</option>
<option
  
  value="NWCLARK/perl-5.8.4-RC1"
>5.8.4-RC1 DEV
  (NWCLARK on 2004-04-05)</option>
<option
  
  value="RGARCIA/perl-5.9.1"
>5.9.1 DEV
  (RGARCIA on 2004-03-16)</option>
<option
  
  value="LBROCARD/perl5.005_04"
>5.005_04
  (LBROCARD on 2004-02-23)</option>
<option
  
  value="NWCLARK/perl-5.8.3"
>5.8.3
  (NWCLARK on 2004-01-14)</option>
<option
  
  value="NWCLARK/perl-5.8.3-RC1"
>5.8.3-RC1 DEV
  (NWCLARK on 2004-01-07)</option>
<option
  
  value="RGARCIA/perl-5.6.2"
>5.6.2
  (RGARCIA on 2003-11-15)</option>
<option
  
  value="NWCLARK/perl-5.8.2"
>5.8.2
  (NWCLARK on 2003-11-05)</option>
<option
  
  value="NWCLARK/perl-5.8.2-RC2"
>5.8.2-RC2 DEV
  (NWCLARK on 2003-11-03)</option>
<option
  
  value="NWCLARK/perl-5.8.2-RC1"
>5.8.2-RC1 DEV
  (NWCLARK on 2003-10-27)</option>
<option
  
  value="HVDS/perl-5.9.0"
>5.9.0 DEV
  (HVDS on 2003-10-27)</option>
<option
  
  value="JHI/perl-5.8.1"
>5.8.1
  (JHI on 2003-09-25)</option>
<option
  
  value="JHI/perl-5.8.0"
>5.8.0
  (JHI on 2002-07-18)</option>
<option
  
  value="JHI/perl-5.7.3"
>5.7.3 DEV
  (JHI on 2002-03-05)</option>
<option
  
  value="JHI/perl-5.7.2"
>5.7.2 DEV
  (JHI on 2001-07-13)</option>
<option
  
  value="GSAR/perl-5.6.1"
>5.6.1
  (GSAR on 2001-04-09)</option>
<option
  
  value="GSAR/perl-5.6.1-TRIAL3"
>5.6.1-TRIAL3 DEV
  (GSAR on 2001-03-19)</option>
<option
  
  value="GSAR/perl-5.6.1-TRIAL2"
>5.6.1-TRIAL2 DEV
  (GSAR on 2001-01-31)</option>
<option
  
  value="GSAR/perl-5.6.1-TRIAL1"
>5.6.1-TRIAL1 DEV
  (GSAR on 2000-12-18)</option>
<option
  
  value="JHI/perl-5.7.0"
>5.7.0 DEV
  (JHI on 2000-09-02)</option>
<option
  
  value="GSAR/perl-5.6.0"
>5.6.0
  (GSAR on 2000-03-23)</option>
<option
  
  value="CHIPS/perl5.004_05"
>5.004_05
  (CHIPS on 1999-04-29)</option>
<option
  
  value="GBARR/perl5.005_03"
>5.005_03
  (GBARR on 1999-03-29)</option>
<option
  
  value="GSAR/perl5.005_02"
>5.005_02
  (GSAR on 1998-08-08)</option>
<option
  
  value="GSAR/perl5.005_01"
>5.005_01
  (GSAR on 1998-07-27)</option>
<option
  
  value="GSAR/perl5.005"
>5.005
  (GSAR on 1998-07-23)</option>
<option
  
  value="TIMB/perl5.004_04"
>5.004_04
  (TIMB on 1997-10-15)</option>
<option
  
  value="TIMB/perl5.004_03"
>5.004_03
  (TIMB on 1997-09-05)</option>
<option
  
  value="TIMB/perl5.004_02"
>5.004_02
  (TIMB on 1997-08-07)</option>
<option
  
  value="TIMB/perl5.004_01"
>5.004_01
  (TIMB on 1997-06-13)</option>
<option
  
  value="CHIPS/perl5.004"
>5.004
  (CHIPS on 1997-05-15)</option>
<optgroup label="BackPAN">'
<option
  
  value="PEVANS/perl-5.38.1a"
>5.38.1a
  (PEVANS on 2023-11-25)</option>
<option
  
  value="PEVANS/perl-5.36.2a"
>5.36.2a
  (PEVANS on 2023-11-25)</option>
<option
  
  value="PEVANS/perl-5.34.2a"
>5.34.2a
  (PEVANS on 2023-11-25)</option>
<option
  
  value="PEVANS/perl-5.38.1"
>5.38.1
  (PEVANS on 2023-11-25)</option>
<option
  
  value="PEVANS/perl-5.36.2"
>5.36.2
  (PEVANS on 2023-11-25)</option>
<option
  
  value="PEVANS/perl-5.34.2"
>5.34.2
  (PEVANS on 2023-11-25)</option>
<option
  
  value="NEILB/perl-5.37.3"
>5.37.3 DEV
  (NEILB on 2022-08-20)</option>
<option
  
  value="NEILB/perl-5.35.7"
>5.35.7 DEV
  (NEILB on 2021-12-20)</option>
<option
  
  value="NEILB/perl-5.35.2"
>5.35.2 DEV
  (NEILB on 2021-07-23)</option>
<option
  
  value="TOMHUKINS/perl-5.33.4"
>5.33.4 DEV
  (TOMHUKINS on 2020-11-20)</option>
<option
  
  value="TOMHUKINS/perl-5.31.3"
>5.31.3 DEV
  (TOMHUKINS on 2019-08-20)</option>
<option
  
  value="SHAY/perl-5.26.1-RC1"
>5.26.1-RC1 DEV
  (SHAY on 2017-09-10)</option>
<option
  
  value="SHAY/perl-5.24.3-RC1"
>5.24.3-RC1 DEV
  (SHAY on 2017-09-10)</option>
<option
  
  value="SHAY/perl-5.22.4"
>5.22.4
  (SHAY on 2017-07-15)</option>
<option
  
  value="SHAY/perl-5.24.2-RC1"
>5.24.2-RC1 DEV
  (SHAY on 2017-07-01)</option>
<option
  
  value="XSAWYERX/perl-5.27.0"
>5.27.0 DEV
  (XSAWYERX on 2017-05-31)</option>
<option
  
  value="XSAWYERX/perl-5.26.0-RC2"
>5.26.0-RC2 DEV
  (XSAWYERX on 2017-05-23)</option>
<option
  
  value="XSAWYERX/perl-5.26.0-RC1"
>5.26.0-RC1 DEV
  (XSAWYERX on 2017-05-11)</option>
<option
  
  value="XSAWYERX/perl-5.25.12"
>5.25.12 DEV
  (XSAWYERX on 2017-04-20)</option>
<option
  
  value="XSAWYERX/perl-5.25.11"
>5.25.11 DEV
  (XSAWYERX on 2017-03-20)</option>
<option
  
  value="SHAY/perl-5.24.1"
>5.24.1
  (SHAY on 2017-01-14)</option>
<option
  
  value="SHAY/perl-5.24.1-RC5"
>5.24.1-RC5 DEV
  (SHAY on 2017-01-02)</option>
<option
  
  value="SHAY/perl-5.22.3-RC5"
>5.22.3-RC5 DEV
  (SHAY on 2017-01-02)</option>
<option
  
  value="XSAWYERX/perl-5.25.8"
>5.25.8 DEV
  (XSAWYERX on 2016-12-20)</option>
<option
  
  value="SHAY/perl-5.24.1-RC4"
>5.24.1-RC4 DEV
  (SHAY on 2016-10-12)</option>
<option
  
  value="SHAY/perl-5.22.3-RC4"
>5.22.3-RC4 DEV
  (SHAY on 2016-10-12)</option>
<option
  
  value="SHAY/perl-5.24.1-RC3"
>5.24.1-RC3 DEV
  (SHAY on 2016-08-11)</option>
<option
  
  value="SHAY/perl-5.22.3-RC3"
>5.22.3-RC3 DEV
  (SHAY on 2016-08-11)</option>
<option
  
  value="SHAY/perl-5.24.1-RC2"
>5.24.1-RC2 DEV
  (SHAY on 2016-07-25)</option>
<option
  
  value="SHAY/perl-5.22.3-RC2"
>5.22.3-RC2 DEV
  (SHAY on 2016-07-25)</option>
<option
  
  value="SHAY/perl-5.25.3"
>5.25.3 DEV
  (SHAY on 2016-07-20)</option>
<option
  
  value="SHAY/perl-5.24.1-RC1"
>5.24.1-RC1 DEV
  (SHAY on 2016-07-17)</option>
<option
  
  value="SHAY/perl-5.22.3-RC1"
>5.22.3-RC1 DEV
  (SHAY on 2016-07-17)</option>
<option
  
  value="XSAWYERX/perl-5.25.1"
>5.25.1 DEV
  (XSAWYERX on 2016-05-20)</option>
<option
  
  value="RJBS/perl-5.25.0"
>5.25.0 DEV
  (RJBS on 2016-05-09)</option>
<option
  
  value="RJBS/perl-5.24.0-RC5"
>5.24.0-RC5 DEV
  (RJBS on 2016-05-04)</option>
<option
  
  value="RJBS/perl-5.24.0-RC4"
>5.24.0-RC4 DEV
  (RJBS on 2016-05-02)</option>
<option
  
  value="SHAY/perl-5.22.2"
>5.22.2
  (SHAY on 2016-04-29)</option>
<option
  
  value="RJBS/perl-5.24.0-RC3"
>5.24.0-RC3 DEV
  (RJBS on 2016-04-27)</option>
<option
  
  value="RJBS/perl-5.24.0-RC2"
>5.24.0-RC2 DEV
  (RJBS on 2016-04-23)</option>
<option
  
  value="RJBS/perl-5.24.0-RC1"
>5.24.0-RC1 DEV
  (RJBS on 2016-04-14)</option>
<option
  
  value="SHAY/perl-5.22.2-RC1"
>5.22.2-RC1 DEV
  (SHAY on 2016-04-10)</option>
<option
  
  value="XSAWYERX/perl-5.23.8"
>5.23.8 DEV
  (XSAWYERX on 2016-02-20)</option>
<option
  
  value="SHAY/perl-5.22.1-RC4"
>5.22.1-RC4 DEV
  (SHAY on 2015-12-08)</option>
<option
  
  value="SHAY/perl-5.22.1-RC3"
>5.22.1-RC3 DEV
  (SHAY on 2015-12-02)</option>
<option
  
  value="SHAY/perl-5.22.1-RC2"
>5.22.1-RC2 DEV
  (SHAY on 2015-11-15)</option>
<option
  
  value="SHAY/perl-5.22.1-RC1"
>5.22.1-RC1 DEV
  (SHAY on 2015-10-31)</option>
<option
  
  value="SHAY/perl-5.23.4"
>5.23.4 DEV
  (SHAY on 2015-10-20)</option>
<option
  
  value="SHAY/perl-5.20.3"
>5.20.3
  (SHAY on 2015-09-12)</option>
<option
  
  value="SHAY/perl-5.20.3-RC2"
>5.20.3-RC2 DEV
  (SHAY on 2015-08-29)</option>
<option
  
  value="SHAY/perl-5.20.3-RC1"
>5.20.3-RC1 DEV
  (SHAY on 2015-08-22)</option>
<option
  
  value="RJBS/perl-5.23.0"
>5.23.0 DEV
  (RJBS on 2015-06-20)</option>
<option
  
  value="SHAY/perl-5.21.11"
>5.21.11 DEV
  (SHAY on 2015-04-20)</option>
<option
  
  value="SHAY/perl-5.21.10"
>5.21.10 DEV
  (SHAY on 2015-03-20)</option>
<option
  
  value="XSAWYERX/perl-5.21.9"
>5.21.9 DEV
  (XSAWYERX on 2015-02-21)</option>
<option
  
  value="SHAY/perl-5.20.2"
>5.20.2
  (SHAY on 2015-02-14)</option>
<option
  
  value="SHAY/perl-5.20.2-RC1"
>5.20.2-RC1 DEV
  (SHAY on 2015-02-01)</option>
<option
  
  value="CORION/perl-5.21.7"
>5.21.7 DEV
  (CORION on 2014-12-20)</option>
<option
  
  value="SHAY/perl-5.21.4"
>5.21.4 DEV
  (SHAY on 2014-09-20)</option>
<option
  
  value="SHAY/perl-5.20.1"
>5.20.1
  (SHAY on 2014-09-14)</option>
<option
  
  value="SHAY/perl-5.20.1-RC2"
>5.20.1-RC2 DEV
  (SHAY on 2014-09-07)</option>
<option
  
  value="SHAY/perl-5.20.1-RC1"
>5.20.1-RC1 DEV
  (SHAY on 2014-08-25)</option>
<option
  
  value="RJBS/perl-5.21.0"
>5.21.0 DEV
  (RJBS on 2014-05-27)</option>
<option
  
  value="SHAY/perl-5.19.11"
>5.19.11 DEV
  (SHAY on 2014-04-20)</option>
<option
  
  value="RJBS/perl-5.19.8"
>5.19.8 DEV
  (RJBS on 2014-01-20)</option>
<option
  
  value="SHAY/perl-5.19.5"
>5.19.5 DEV
  (SHAY on 2013-10-20)</option>
<option
  
  value="SHAY/perl-5.19.4"
>5.19.4 DEV
  (SHAY on 2013-09-20)</option>
<option
  
  value="SHAY/perl-5.19.3"
>5.19.3 DEV
  (SHAY on 2013-08-20)</option>
<option
  
  value="ARISTOTLE/perl-5.19.2"
>5.19.2 DEV
  (ARISTOTLE on 2013-07-22)</option>
<option
  
  value="RJBS/perl-5.19.0"
>5.19.0 DEV
  (RJBS on 2013-05-20)</option>
<option
  
  value="RJBS/perl-5.17.11"
>5.17.11 DEV
  (RJBS on 2013-04-21)</option>
<option
  
  value="CORION/perl-5.17.10"
>5.17.10 DEV
  (CORION on 2013-03-21)</option>
<option
  
  value="RJBS/perl-5.17.6"
>5.17.6 DEV
  (RJBS on 2012-11-21)</option>
<option
  
  value="SHAY/perl-5.17.3"
>5.17.3 DEV
  (SHAY on 2012-08-20)</option>
<option
  
  value="CORION/perl-5.15.8"
>5.15.8 DEV
  (CORION on 2012-02-20)</option>
<option
  
  value="SHAY/perl-5.15.5"
>5.15.5 DEV
  (SHAY on 2011-11-20)</option>
<option
  
  value="RJBS/perl-5.15.2"
>5.15.2 DEV
  (RJBS on 2011-08-21)</option>
<option
  
  value="SHAY/perl-5.13.5"
>5.13.5 DEV
  (SHAY on 2010-09-19)</option>
<option
  
  value="RJBS/perl-5.13.1"
>5.13.1 DEV
  (RJBS on 2010-05-20)</option>
<option
  
  value="JESSE/perl-5.12.0-RC0"
>5.12.0-RC0 DEV
  (JESSE on 2010-03-21)</option>
<option
  
  value="SHAY/perl-5.11.5"
>5.11.5 DEV
  (SHAY on 2010-02-21)</option>
<option
  
  value="RJBS/perl-5.11.4"
>5.11.4 DEV
  (RJBS on 2010-01-20)</option>
<option
  
  value="RGARCIA/perl-5.10.0-RC2"
>5.10.0-RC2 DEV
  (RGARCIA on 2007-11-25)</option>
<option
  
  value="RGARCIA/perl-5.10.0-RC1"
>5.10.0-RC1 DEV
  (RGARCIA on 2007-11-17)</option>
<option
  
  value="LBROCARD/perl5.005_04-RC2"
>5.005_04-RC2 DEV
  (LBROCARD on 2004-02-18)</option>
<option
  
  value="LBROCARD/perl5.005_04-RC1"
>5.005_04-RC1 DEV
  (LBROCARD on 2004-02-04)</option>
<option
  
  value="LBROCARD/perl5.005_03-MAINT22213"
>5.005_03-MAINT22213 DEV
  (LBROCARD on 2004-01-27)</option>
<option
  
  value="LBROCARD/perl5.005_03-MAINT22178"
>5.005_03-MAINT22178 DEV
  (LBROCARD on 2004-01-20)</option>
<option
  
  value="LBROCARD/perl5.005_03-MAINT21792"
>5.005_03-MAINT21792 DEV
  (LBROCARD on 2003-12-05)</option>
<option
  
  value="RGARCIA/perl-5.6.2-RC1"
>5.6.2-RC1 DEV
  (RGARCIA on 2003-11-08)</option>
<option
  
  value="JHI/perl-5.8.1-RC5"
>5.8.1-RC5 DEV
  (JHI on 2003-09-22)</option>
<option
  
  value="JHI/perl-5.8.1-RC4"
>5.8.1-RC4 DEV
  (JHI on 2003-08-01)</option>
<option
  
  value="JHI/perl-5.8.1-RC3"
>5.8.1-RC3 DEV
  (JHI on 2003-07-30)</option>
<option
  
  value="JHI/perl-5.8.1-RC2"
>5.8.1-RC2 DEV
  (JHI on 2003-07-11)</option>
<option
  
  value="JHI/perl-5.8.1-RC1"
>5.8.1-RC1 DEV
  (JHI on 2003-07-10)</option>
<option
  
  value="JHI/perl-5.8.0-RC3"
>5.8.0-RC3 DEV
  (JHI on 2002-07-14)</option>
<option
  
  value="JHI/perl-5.8.0-RC2"
>5.8.0-RC2 DEV
  (JHI on 2002-06-21)</option>
<option
  
  value="JHI/perl-5.8.0-RC1"
>5.8.0-RC1 DEV
  (JHI on 2002-06-01)</option>
<option
  
  value="JHI/perl-5.7.1"
>5.7.1 DEV
  (JHI on 2001-04-10)</option>
<option
  
  value="GSAR/perl-5.5.670"
>5.5.670 DEV
  (GSAR on 2000-03-01)</option>
<option
  
  value="GSAR/perl5.5.660"
>5.5.660 DEV
  (GSAR on 2000-02-22)</option>
<option
  
  value="GSAR/perl5.5.650"
>5.5.650 DEV
  (GSAR on 2000-02-08)</option>
<option
  
  value="GSAR/perl5.5.640"
>5.5.640 DEV
  (GSAR on 2000-02-02)</option>
<option
  
  value="GSAR/perl5.005_63"
>5.005_63 DEV
  (GSAR on 1999-12-09)</option>
<option
  
  value="GSAR/perl5.005_62"
>5.005_62 DEV
  (GSAR on 1999-10-15)</option>
<option
  
  value="GSAR/perl5.005_61"
>5.005_61 DEV
  (GSAR on 1999-08-22)</option>
<option
  
  value="GSAR/perl5.005_60"
>5.005_60 DEV
  (GSAR on 1999-08-02)</option>
<option
  
  value="GSAR/perl5.005_59"
>5.005_59 DEV
  (GSAR on 1999-08-02)</option>
<option
  
  value="GSAR/perl5.005_58"
>5.005_58 DEV
  (GSAR on 1999-07-27)</option>
<option
  
  value="GSAR/perl5.005_57"
>5.005_57 DEV
  (GSAR on 1999-05-25)</option>
<option
  
  value="CHIPS/perl5.004_05-MAINT_TRIAL_9"
>5.004_05-MAINT_TRIAL_9 DEV
  (CHIPS on 1999-04-27)</option>
<option
  
  value="GBARR/perl5.005_03-MAINT_TRIAL_6"
>5.005_03-MAINT_TRIAL_6 DEV
  (GBARR on 1999-03-05)</option>
<option
  
  value="GSAR/perl5.005_56"
>5.005_56 DEV
  (GSAR on 1999-03-01)</option>
<option
  
  value="GSAR/perl5.005_55"
>5.005_55 DEV
  (GSAR on 1999-02-16)</option>
<option
  
  value="GBARR/perl5.005_03-MAINT_TRIAL_5"
>5.005_03-MAINT_TRIAL_5 DEV
  (GBARR on 1999-01-29)</option>
<option
  
  value="GBARR/perl5.005_03-MAINT_TRIAL_4"
>5.005_03-MAINT_TRIAL_4 DEV
  (GBARR on 1999-01-26)</option>
<option
  
  value="GBARR/perl5.005_03-MAINT_TRIAL_3"
>5.005_03-MAINT_TRIAL_3 DEV
  (GBARR on 1999-01-17)</option>
<option
  
  value="GBARR/perl5.005_03-MAINT_TRIAL_2"
>5.005_03-MAINT_TRIAL_2 DEV
  (GBARR on 1999-01-03)</option>
<option
  
  value="TIMB/perl5.004_05-MAINT_TRIAL_8"
>5.004_05-MAINT_TRIAL_8 DEV
  (TIMB on 1998-12-03)</option>
<option
  
  value="GSAR/perl5.005_54"
>5.005_54 DEV
  (GSAR on 1998-11-30)</option>
<option
  
  value="GBARR/perl5.005_03-MAINT_TRIAL_1"
>5.005_03-MAINT_TRIAL_1 DEV
  (GBARR on 1998-11-30)</option>
<option
  
  value="TIMB/perl5.004_05-MAINT_TRIAL_7"
>5.004_05-MAINT_TRIAL_7 DEV
  (TIMB on 1998-11-22)</option>
<option
  
  value="GSAR/perl5.005_53"
>5.005_53 DEV
  (GSAR on 1998-10-31)</option>
<option
  
  value="TIMB/perl5.004_05-MAINT_TRIAL_6"
>5.004_05-MAINT_TRIAL_6 DEV
  (TIMB on 1998-10-09)</option>
<option
  
  value="GSAR/perl5.005_52"
>5.005_52 DEV
  (GSAR on 1998-09-25)</option>
<option
  
  value="GSAR/perl5.005_51"
>5.005_51 DEV
  (GSAR on 1998-08-10)</option>
<option
  
  value="GSAR/perl5.005_02-TRIAL2"
>5.005_02-TRIAL2 DEV
  (GSAR on 1998-08-05)</option>
<option
  
  value="GSAR/perl5.005_02-TRIAL1"
>5.005_02-TRIAL1 DEV
  (GSAR on 1998-08-02)</option>
<option
  
  value="GSAR/perl5.005_50"
>5.005_50 DEV
  (GSAR on 1998-07-26)</option>
<option
  
  value="GSAR/perl5.005-beta2"
>5.005-beta2
  (GSAR on 1998-07-21)</option>
<option
  
  value="TIMB/perl5.004_05-MAINT_TRIAL_5"
>5.004_05-MAINT_TRIAL_5 DEV
  (TIMB on 1998-07-21)</option>
<option
  
  value="GSAR/perl5.005-beta1"
>5.005-beta1
  (GSAR on 1998-07-15)</option>
<option
  
  value="GSAR/perl5.004_74"
>5.004_74 DEV
  (GSAR on 1998-07-14)</option>
<option
  
  value="GSAR/perl5.004_73"
>5.004_73 DEV
  (GSAR on 1998-07-13)</option>
<option
  
  value="GSAR/perl5.004_72"
>5.004_72 DEV
  (GSAR on 1998-07-12)</option>
<option
  
  value="GSAR/perl5.004_71"
>5.004_71 DEV
  (GSAR on 1998-07-09)</option>
<option
  
  value="GSAR/perl5.004_70"
>5.004_70 DEV
  (GSAR on 1998-07-06)</option>
<option
  
  value="GSAR/perl5.004_69"
>5.004_69 DEV
  (GSAR on 1998-06-29)</option>
<option
  
  value="GSAR/perl5.004_68"
>5.004_68 DEV
  (GSAR on 1998-06-23)</option>
<option
  
  value="GSAR/perl5.004_67"
>5.004_67 DEV
  (GSAR on 1998-06-15)</option>
<option
  
  value="MICB/perl5.004_66"
>5.004_66 DEV
  (MICB on 1998-05-29)</option>
<option
  
  value="TIMB/perl5.004_04-m4"
>5.004_04-m4 DEV
  (TIMB on 1998-05-19)</option>
<option
  
  value="TIMB/perl5.004_04-m3"
>5.004_04-m3 DEV
  (TIMB on 1998-05-15)</option>
<option
  
  value="MICB/perl5.004_65"
>5.004_65 DEV
  (MICB on 1998-05-15)</option>
<option
  
  value="TIMB/perl5.004_04-m2"
>5.004_04-m2 DEV
  (TIMB on 1998-05-01)</option>
<option
  
  value="MICB/perl5.004_64"
>5.004_64 DEV
  (MICB on 1998-04-03)</option>
<option
  
  value="MICB/perl5.004_63"
>5.004_63 DEV
  (MICB on 1998-03-17)</option>
<option
  
  value="MICB/perl5.004_62"
>5.004_62 DEV
  (MICB on 1998-03-06)</option>
<option
  
  value="TIMB/perl5.004m5t1"
>5.004m5t1
  (TIMB on 1998-03-04)</option>
<option
  
  value="MICB/perl5.004_61"
>5.004_61 DEV
  (MICB on 1998-02-27)</option>
<option
  
  value="MICB/perl5.004_60"
>5.004_60 DEV
  (MICB on 1998-02-20)</option>
<option
  
  value="MICB/perl5.004_59"
>5.004_59 DEV
  (MICB on 1998-02-13)</option>
<option
  
  value="MICB/perl5.004_58"
>5.004_58 DEV
  (MICB on 1998-02-06)</option>
<option
  
  value="MICB/perl5.004_57"
>5.004_57 DEV
  (MICB on 1998-02-03)</option>
<option
  
  value="MICB/perl5.004_56"
>5.004_56 DEV
  (MICB on 1997-12-18)</option>
<option
  
  value="MICB/perl5.004_55"
>5.004_55 DEV
  (MICB on 1997-11-25)</option>
<option
  
  value="MICB/perl5.004_54"
>5.004_54 DEV
  (MICB on 1997-11-14)</option>
<option
  
  value="MICB/perl5.004_53"
>5.004_53 DEV
  (MICB on 1997-10-16)</option>
<option
  
  value="MICB/perl5.004_52"
>5.004_52 DEV
  (MICB on 1997-10-15)</option>
<option
  
  value="TIMB/perl5.004m4t4"
>5.004m4t4
  (TIMB on 1997-10-14)</option>
<option
  
  value="TIMB/perl5.004m4t3"
>5.004m4t3
  (TIMB on 1997-10-09)</option>
<option
  
  value="MICB/perl5.004_51"
>5.004_51 DEV
  (MICB on 1997-10-02)</option>
<option
  
  value="TIMB/perl5.004m4t2"
>5.004m4t2
  (TIMB on 1997-09-23)</option>
<option
  
  value="TIMB/perl5.004m4t1"
>5.004m4t1
  (TIMB on 1997-09-19)</option>
<option
  
  value="TIMB/perl5.004m3t2"
>5.004m3t2
  (TIMB on 1997-09-05)</option>
<option
  
  value="CHIPS/perl5.003_99a"
>5.003_99a DEV
  (CHIPS on 1997-05-09)</option>
<option
  
  value="CHIPS/perl5.003_99"
>5.003_99 DEV
  (CHIPS on 1997-05-01)</option>
<option
  
  value="CHIPS/perl5.003_98"
>5.003_98 DEV
  (CHIPS on 1997-04-30)</option>
<option
  
  value="CHIPS/perl5.003_97j"
>5.003_97j DEV
  (CHIPS on 1997-04-28)</option>
<option
  
  value="CHIPS/perl5.003_97i"
>5.003_97i DEV
  (CHIPS on 1997-04-25)</option>
<option
  
  value="CHIPS/perl5.003_97h"
>5.003_97h DEV
  (CHIPS on 1997-04-24)</option>
<option
  
  value="CHIPS/perl5.003_97"
>5.003_97 DEV
  (CHIPS on 1997-04-03)</option>
<option
  
  value="CHIPS/perl5.003_96"
>5.003_96 DEV
  (CHIPS on 1997-04-01)</option>
<option
  
  value="CHIPS/perl5.003_95"
>5.003_95 DEV
  (CHIPS on 1997-03-25)</option>
<option
  
  value="CHIPS/perl5.003_94"
>5.003_94 DEV
  (CHIPS on 1997-03-22)</option>
<option
  
  value="CHIPS/perl5.003_93"
>5.003_93 DEV
  (CHIPS on 1997-03-10)</option>
<option
  
  value="CHIPS/perl5.003_92"
>5.003_92 DEV
  (CHIPS on 1997-03-06)</option>
<option
  
  value="CHIPS/perl5.003_91"
>5.003_91 DEV
  (CHIPS on 1997-03-01)</option>
<option
  
  value="CHIPS/perl5.003_90"
>5.003_90 DEV
  (CHIPS on 1997-02-25)</option>
<option
  
  value="CHIPS/perl5.003_28"
>5.003_28
  (CHIPS on 1997-02-21)</option>
<option
  
  value="CHIPS/perl5.003_27"
>5.003_27
  (CHIPS on 1997-02-18)</option>
<option
  
  value="CHIPS/perl5.003_26"
>5.003_26
  (CHIPS on 1997-02-10)</option>
<option
  
  value="CHIPS/perl5.003_25"
>5.003_25
  (CHIPS on 1997-02-04)</option>
<option
  
  value="CHIPS/perl5.003_24"
>5.003_24
  (CHIPS on 1997-01-29)</option>
<option
  
  value="CHIPS/perl5.003_23"
>5.003_23
  (CHIPS on 1997-01-25)</option>
<option
  
  value="CHIPS/perl5.003_22"
>5.003_22
  (CHIPS on 1997-01-16)</option>
<option
  
  value="CHIPS/perl5.003_21"
>5.003_21
  (CHIPS on 1997-01-15)</option>
<option
  
  value="CHIPS/perl5.003_20"
>5.003_20
  (CHIPS on 1997-01-08)</option>
<option
  
  value="CHIPS/perl5.003_19"
>5.003_19
  (CHIPS on 1997-01-04)</option>
<option
  
  value="CHIPS/perl5.003_18"
>5.003_18
  (CHIPS on 1996-12-31)</option>
<option
  
  value="CHIPS/perl5.003_17"
>5.003_17
  (CHIPS on 1996-12-27)</option>
<option
  
  value="CHIPS/perl5.003_16"
>5.003_16
  (CHIPS on 1996-12-24)</option>
<option
  
  value="CHIPS/perl5.003_15"
>5.003_15
  (CHIPS on 1996-12-23)</option>
<option
  
  value="CHIPS/perl-5.003_13"
>5.003_13
  (CHIPS on 1996-12-20)</option>
<option
  
  value="CHIPS/perl5.003_12"
>5.003_12
  (CHIPS on 1996-12-19)</option>
<option
  
  value="CHIPS/perl5.003_11"
>5.003_11
  (CHIPS on 1996-12-06)</option>
<option
  
  value="CHIPS/perl5.003_10"
>5.003_10
  (CHIPS on 1996-11-30)</option>
<option
  
  value="CHIPS/perl5.003_09"
>5.003_09
  (CHIPS on 1996-11-26)</option>
<option
  
  value="CHIPS/perl5.003_08"
>5.003_08
  (CHIPS on 1996-11-19)</option>
<option
  
  value="ANDYD/perl5.003_07"
>5.003_07
  (ANDYD on 1996-10-11)</option>
<option
  
  value="ANDYD/perl5.003_06"
>5.003_06
  (ANDYD on 1996-10-08)</option>
<option
  
  value="ANDYD/perl5.003_05"
>5.003_05
  (ANDYD on 1996-09-12)</option>
<option
  
  value="ANDYD/perl5.003_04"
>5.003_04
  (ANDYD on 1996-09-02)</option>
<option
  
  value="ANDYD/perl5.003_03"
>5.003_03
  (ANDYD on 1996-08-28)</option>
<option
  
  value="NI-S/perl5.003_02"
>5.003_02
  (NI-S on 1996-08-10)</option>
<option
  
  value="NI-S/perl5.003_02a"
>5.003_02a DEV
  (NI-S on 1996-08-08)</option>
<option
  
  value="LWALL/perl5.002b3"
>5.002b3
  (LWALL on 1996-02-03)</option>
</optgroup>
</select>
    </li>

    <li>
<ul class="dependencies">
  <li class="nav-header">Dependencies</li>
  <li><i class="ttip" title="dynamic_config enabled">unknown</i></li>
  <li>
    <hr>
  </li>
  <li>
    <a href="https://metacpan.org/module/perlfunc/requires">Reverse dependencies</a>
  </li>
  <li>
    <a href="http://deps.cpantesters.org/?module=perlfunc">CPAN Testers List</a>
  </li>
  <li>
    <a href="https://cpandeps.grinnz.com/?dist=perl">Dependency graph</a>
  </li>
</ul>
    </li>
    <li class="nav-header">Permalinks</li>
    <li>
      <a href="https://metacpan.org/release/PEVANS/perl-5.38.2/view/pod/perlfunc.pod">This version</a>
    </li>
    <li>
      <a href="https://metacpan.org/dist/perl/view/pod/perlfunc.pod">Latest version</a>
    </li>
    <li>
<div class="plussers">
<div class="nav-header">++ed by:</div>
<div>
<a class="display-all" href="https://metacpan.org/author/FLORA"><img src="https://www.gravatar.com/avatar/fd2bdaaefe41908133793d1ddf38f75d?d=identicon&amp;s=20" title="FLORA" alt="FLORA"></a>
<a class="display-all" href="https://metacpan.org/author/OLEG"><img src="https://www.gravatar.com/avatar/1f3964892d632250b4358dbb95d53b04?d=identicon&amp;s=20" title="OLEG" alt="OLEG"></a>
<a class="display-all" href="https://metacpan.org/author/JNBEK"><img src="https://www.gravatar.com/avatar/499c962737f2931cbce15097c5cf4002?d=identicon&amp;s=20" title="JNBEK" alt="JNBEK"></a>
<a class="display-all" href="https://metacpan.org/author/RJBS"><img src="https://www.gravatar.com/avatar/cec6b9b88295ead26c65f8747a76561b?d=identicon&amp;s=20" title="RJBS" alt="RJBS"></a>
<a class="display-all" href="https://metacpan.org/author/IOANR"><img src="https://www.gravatar.com/avatar/98ca06f241752dc58bf366e44e1f1b84?d=identicon&amp;s=20" title="IOANR" alt="IOANR"></a>
</div>
<!-- Display counts of plussers-->
<div>
    <a href="https://metacpan.org/dist/perl/plussers">191 PAUSE users</a>
</div>
<div>
    230 non-PAUSE users
</div>
</div>
    </li>
    <li>
<div id="metacpan_contributors">
  <div>
    <button class="btn-link"
      onclick="$(this).hide(); $('#metacpan_contributors ul').slideDown(); return false;"
    >and 1 contributors</button>
  </div>
  <ul style="display: none">
    <li class="contributor"
    >
      perl5-porters@perl.org
    </li>
  </ul>
</div>
    </li>
              </ul>
            </div>
          </nav>
          <div class="content-navigation">
<div class="breadcrumbs">
  <span>
    <a data-keyboard-shortcut="g a" rel="author" href="https://metacpan.org/author/PEVANS" class="author-name">Paul Evans</a>
  </span>
  <span>&nbsp;/&nbsp;</span>
  <div class="release dist-release status-latest maturity-released">
    <span class="dropdown"><b class="caret"></b></span>
<select onchange="document.location.href=&#39;/release/&#39;+this.value+&#39;/view/pod/perlfunc.pod&#39;" class="">
<option
  
  value="CORION/perl-5.39.7"
>5.39.7 DEV
  (CORION on 2024-01-20)</option>
<option
  
  value="BOOK/perl-5.39.6"
>5.39.6 DEV
  (BOOK on 2023-12-30)</option>
<option
  selected
  value="PEVANS/perl-5.38.2"
>5.38.2
  (PEVANS on 2023-11-29)</option>
<option
  
  value="PEVANS/perl-5.36.3"
>5.36.3
  (PEVANS on 2023-11-29)</option>
<option
  
  value="PEVANS/perl-5.34.3"
>5.34.3
  (PEVANS on 2023-11-29)</option>
<option
  
  value="ETHER/perl-5.39.5"
>5.39.5 DEV
  (ETHER on 2023-11-20)</option>
<option
  
  value="HAARG/perl-5.39.4"
>5.39.4 DEV
  (HAARG on 2023-10-25)</option>
<option
  
  value="WOLFSAGE/perl-5.39.3"
>5.39.3 DEV
  (WOLFSAGE on 2023-09-20)</option>
<option
  
  value="PEVANS/perl-5.39.2"
>5.39.2 DEV
  (PEVANS on 2023-08-20)</option>
<option
  
  value="SHAY/perl-5.39.1"
>5.39.1 DEV
  (SHAY on 2023-07-20)</option>
<option
  
  value="RJBS/perl-5.38.0"
>5.38.0
  (RJBS on 2023-07-02)</option>
<option
  
  value="RJBS/perl-5.38.0-RC2"
>5.38.0-RC2 DEV
  (RJBS on 2023-06-23)</option>
<option
  
  value="RJBS/perl-5.38.0-RC1"
>5.38.0-RC1 DEV
  (RJBS on 2023-06-16)</option>
<option
  
  value="SHAY/perl-5.36.1"
>5.36.1
  (SHAY on 2023-04-23)</option>
<option
  
  value="SHAY/perl-5.37.11"
>5.37.11 DEV
  (SHAY on 2023-04-20)</option>
<option
  
  value="SHAY/perl-5.36.1-RC3"
>5.36.1-RC3 DEV
  (SHAY on 2023-04-16)</option>
<option
  
  value="SHAY/perl-5.36.1-RC2"
>5.36.1-RC2 DEV
  (SHAY on 2023-04-11)</option>
<option
  
  value="SHAY/perl-5.36.1-RC1"
>5.36.1-RC1 DEV
  (SHAY on 2023-04-10)</option>
<option
  
  value="YVES/perl-5.37.10"
>5.37.10 DEV
  (YVES on 2023-03-21)</option>
<option
  
  value="ETHER/perl-5.37.9"
>5.37.9 DEV
  (ETHER on 2023-02-20)</option>
<option
  
  value="RENEEB/perl-5.37.8"
>5.37.8 DEV
  (RENEEB on 2023-01-20)</option>
<option
  
  value="HYDAHY/perl-5.37.7"
>5.37.7 DEV
  (HYDAHY on 2022-12-20)</option>
<option
  
  value="CORION/perl-5.37.6"
>5.37.6 DEV
  (CORION on 2022-11-20)</option>
<option
  
  value="TODDR/perl-5.37.5"
>5.37.5 DEV
  (TODDR on 2022-10-20)</option>
<option
  
  value="ETHER/perl-5.37.4"
>5.37.4 DEV
  (ETHER on 2022-09-21)</option>
<option
  
  value="ATOOMIC/perl-5.37.2"
>5.37.2 DEV
  (ATOOMIC on 2022-07-21)</option>
<option
  
  value="WOLFSAGE/perl-5.37.1"
>5.37.1 DEV
  (WOLFSAGE on 2022-06-20)</option>
<option
  
  value="RJBS/perl-5.37.0"
>5.37.0 DEV
  (RJBS on 2022-05-28)</option>
<option
  
  value="RJBS/perl-5.36.0"
>5.36.0
  (RJBS on 2022-05-28)</option>
<option
  
  value="RJBS/perl-5.36.0-RC3"
>5.36.0-RC3 DEV
  (RJBS on 2022-05-22)</option>
<option
  
  value="RJBS/perl-5.36.0-RC2"
>5.36.0-RC2 DEV
  (RJBS on 2022-05-21)</option>
<option
  
  value="SHAY/perl-5.35.11"
>5.35.11 DEV
  (SHAY on 2022-04-20)</option>
<option
  
  value="XSAWYERX/perl-5.35.10"
>5.35.10 DEV
  (XSAWYERX on 2022-03-20)</option>
<option
  
  value="SHAY/perl-5.34.1"
>5.34.1
  (SHAY on 2022-03-13)</option>
<option
  
  value="SHAY/perl-5.34.1-RC2"
>5.34.1-RC2 DEV
  (SHAY on 2022-03-06)</option>
<option
  
  value="SHAY/perl-5.34.1-RC1"
>5.34.1-RC1 DEV
  (SHAY on 2022-02-27)</option>
<option
  
  value="RENEEB/perl-5.35.9"
>5.35.9 DEV
  (RENEEB on 2022-02-20)</option>
<option
  
  value="ATOOMIC/perl-5.35.8"
>5.35.8 DEV
  (ATOOMIC on 2022-01-20)</option>
<option
  
  value="HYDAHY/perl-5.35.6"
>5.35.6 DEV
  (HYDAHY on 2021-11-21)</option>
<option
  
  value="LEONT/perl-5.35.5"
>5.35.5 DEV
  (LEONT on 2021-10-21)</option>
<option
  
  value="WOLFSAGE/perl-5.35.4"
>5.35.4 DEV
  (WOLFSAGE on 2021-09-20)</option>
<option
  
  value="ETHER/perl-5.35.3"
>5.35.3 DEV
  (ETHER on 2021-08-21)</option>
<option
  
  value="CORION/perl-5.35.1"
>5.35.1 DEV
  (CORION on 2021-06-20)</option>
<option
  
  value="RJBS/perl-5.35.0"
>5.35.0 DEV
  (RJBS on 2021-05-21)</option>
<option
  
  value="XSAWYERX/perl-5.34.0"
>5.34.0
  (XSAWYERX on 2021-05-20)</option>
<option
  
  value="XSAWYERX/perl-5.34.0-RC2"
>5.34.0-RC2 DEV
  (XSAWYERX on 2021-05-15)</option>
<option
  
  value="XSAWYERX/perl-5.34.0-RC1"
>5.34.0-RC1 DEV
  (XSAWYERX on 2021-05-04)</option>
<option
  
  value="TODDR/perl-5.33.9"
>5.33.9 DEV
  (TODDR on 2021-04-20)</option>
<option
  
  value="ATOOMIC/perl-5.33.8"
>5.33.8 DEV
  (ATOOMIC on 2021-03-21)</option>
<option
  
  value="RENEEB/perl-5.33.7"
>5.33.7 DEV
  (RENEEB on 2021-02-20)</option>
<option
  
  value="SHAY/perl-5.32.1"
>5.32.1
  (SHAY on 2021-01-23)</option>
<option
  
  value="HYDAHY/perl-5.33.6"
>5.33.6 DEV
  (HYDAHY on 2021-01-21)</option>
<option
  
  value="SHAY/perl-5.32.1-RC1"
>5.32.1-RC1 DEV
  (SHAY on 2021-01-09)</option>
<option
  
  value="CORION/perl-5.33.5"
>5.33.5 DEV
  (CORION on 2020-12-20)</option>
<option
  
  value="SHAY/perl-5.33.3"
>5.33.3 DEV
  (SHAY on 2020-10-20)</option>
<option
  
  value="XSAWYERX/perl-5.33.2"
>5.33.2 DEV
  (XSAWYERX on 2020-09-20)</option>
<option
  
  value="ETHER/perl-5.33.1"
>5.33.1 DEV
  (ETHER on 2020-08-20)</option>
<option
  
  value="XSAWYERX/perl-5.33.0"
>5.33.0 DEV
  (XSAWYERX on 2020-07-17)</option>
<option
  
  value="XSAWYERX/perl-5.32.0"
>5.32.0
  (XSAWYERX on 2020-06-20)</option>
<option
  
  value="XSAWYERX/perl-5.32.0-RC1"
>5.32.0-RC1 DEV
  (XSAWYERX on 2020-06-07)</option>
<option
  
  value="XSAWYERX/perl-5.30.3-RC1"
>5.30.3-RC1 DEV
  (XSAWYERX on 2020-06-01)</option>
<option
  
  value="XSAWYERX/perl-5.30.3"
>5.30.3
  (XSAWYERX on 2020-06-01)</option>
<option
  
  value="XSAWYERX/perl-5.28.3-RC1"
>5.28.3-RC1 DEV
  (XSAWYERX on 2020-06-01)</option>
<option
  
  value="XSAWYERX/perl-5.28.3"
>5.28.3
  (XSAWYERX on 2020-06-01)</option>
<option
  
  value="XSAWYERX/perl-5.32.0-RC0"
>5.32.0-RC0 DEV
  (XSAWYERX on 2020-05-30)</option>
<option
  
  value="XSAWYERX/perl-5.31.11"
>5.31.11 DEV
  (XSAWYERX on 2020-04-28)</option>
<option
  
  value="XSAWYERX/perl-5.31.10"
>5.31.10 DEV
  (XSAWYERX on 2020-03-20)</option>
<option
  
  value="SHAY/perl-5.30.2"
>5.30.2
  (SHAY on 2020-03-14)</option>
<option
  
  value="SHAY/perl-5.30.2-RC1"
>5.30.2-RC1 DEV
  (SHAY on 2020-02-29)</option>
<option
  
  value="RENEEB/perl-5.31.9"
>5.31.9 DEV
  (RENEEB on 2020-02-20)</option>
<option
  
  value="WOLFSAGE/perl-5.31.8"
>5.31.8 DEV
  (WOLFSAGE on 2020-01-20)</option>
<option
  
  value="ATOOMIC/perl-5.31.7"
>5.31.7 DEV
  (ATOOMIC on 2019-12-21)</option>
<option
  
  value="BINGOS/perl-5.31.6"
>5.31.6 DEV
  (BINGOS on 2019-11-20)</option>
<option
  
  value="SHAY/perl-5.30.1"
>5.30.1
  (SHAY on 2019-11-10)</option>
<option
  
  value="SHAY/perl-5.30.1-RC1"
>5.30.1-RC1 DEV
  (SHAY on 2019-10-27)</option>
<option
  
  value="SHAY/perl-5.31.5"
>5.31.5 DEV
  (SHAY on 2019-10-20)</option>
<option
  
  value="CORION/perl-5.31.4"
>5.31.4 DEV
  (CORION on 2019-09-20)</option>
<option
  
  value="SHAY/perl-5.31.2"
>5.31.2 DEV
  (SHAY on 2019-07-20)</option>
<option
  
  value="ETHER/perl-5.31.1"
>5.31.1 DEV
  (ETHER on 2019-06-20)</option>
<option
  
  value="XSAWYERX/perl-5.31.0"
>5.31.0 DEV
  (XSAWYERX on 2019-05-24)</option>
<option
  
  value="XSAWYERX/perl-5.30.0"
>5.30.0
  (XSAWYERX on 2019-05-22)</option>
<option
  
  value="XSAWYERX/perl-5.30.0-RC2"
>5.30.0-RC2 DEV
  (XSAWYERX on 2019-05-17)</option>
<option
  
  value="XSAWYERX/perl-5.30.0-RC1"
>5.30.0-RC1 DEV
  (XSAWYERX on 2019-05-11)</option>
<option
  
  value="XSAWYERX/perl-5.29.10"
>5.29.10 DEV
  (XSAWYERX on 2019-04-20)</option>
<option
  
  value="SHAY/perl-5.28.2"
>5.28.2
  (SHAY on 2019-04-19)</option>
<option
  
  value="SHAY/perl-5.28.2-RC1"
>5.28.2-RC1 DEV
  (SHAY on 2019-04-05)</option>
<option
  
  value="ZAKAME/perl-5.29.9"
>5.29.9 DEV
  (ZAKAME on 2019-03-21)</option>
<option
  
  value="ATOOMIC/perl-5.29.8"
>5.29.8 DEV
  (ATOOMIC on 2019-02-21)</option>
<option
  
  value="ABIGAIL/perl-5.29.7"
>5.29.7 DEV
  (ABIGAIL on 2019-01-20)</option>
<option
  
  value="ABIGAIL/perl-5.29.6"
>5.29.6 DEV
  (ABIGAIL on 2018-12-18)</option>
<option
  
  value="SHAY/perl-5.28.1-RC1"
>5.28.1-RC1 DEV
  (SHAY on 2018-11-30)</option>
<option
  
  value="SHAY/perl-5.26.3-RC1"
>5.26.3-RC1 DEV
  (SHAY on 2018-11-30)</option>
<option
  
  value="SHAY/perl-5.28.1"
>5.28.1
  (SHAY on 2018-11-29)</option>
<option
  
  value="SHAY/perl-5.26.3"
>5.26.3
  (SHAY on 2018-11-29)</option>
<option
  
  value="ETHER/perl-5.29.5"
>5.29.5 DEV
  (ETHER on 2018-11-20)</option>
<option
  
  value="ARC/perl-5.29.4"
>5.29.4 DEV
  (ARC on 2018-10-20)</option>
<option
  
  value="GENEHACK/perl-5.29.3"
>5.29.3 DEV
  (GENEHACK on 2018-09-21)</option>
<option
  
  value="BINGOS/perl-5.29.2"
>5.29.2 DEV
  (BINGOS on 2018-08-20)</option>
<option
  
  value="SHAY/perl-5.29.1"
>5.29.1 DEV
  (SHAY on 2018-07-20)</option>
<option
  
  value="XSAWYERX/perl-5.29.0"
>5.29.0 DEV
  (XSAWYERX on 2018-06-26)</option>
<option
  
  value="XSAWYERX/perl-5.28.0"
>5.28.0
  (XSAWYERX on 2018-06-23)</option>
<option
  
  value="XSAWYERX/perl-5.28.0-RC4"
>5.28.0-RC4 DEV
  (XSAWYERX on 2018-06-19)</option>
<option
  
  value="XSAWYERX/perl-5.28.0-RC3"
>5.28.0-RC3 DEV
  (XSAWYERX on 2018-06-18)</option>
<option
  
  value="XSAWYERX/perl-5.28.0-RC2"
>5.28.0-RC2 DEV
  (XSAWYERX on 2018-06-06)</option>
<option
  
  value="XSAWYERX/perl-5.28.0-RC1"
>5.28.0-RC1 DEV
  (XSAWYERX on 2018-05-21)</option>
<option
  
  value="XSAWYERX/perl-5.27.11"
>5.27.11 DEV
  (XSAWYERX on 2018-04-20)</option>
<option
  
  value="SHAY/perl-5.26.2"
>5.26.2
  (SHAY on 2018-04-14)</option>
<option
  
  value="SHAY/perl-5.24.4"
>5.24.4
  (SHAY on 2018-04-14)</option>
<option
  
  value="SHAY/perl-5.26.2-RC1"
>5.26.2-RC1 DEV
  (SHAY on 2018-03-24)</option>
<option
  
  value="SHAY/perl-5.24.4-RC1"
>5.24.4-RC1 DEV
  (SHAY on 2018-03-24)</option>
<option
  
  value="TODDR/perl-5.27.10"
>5.27.10 DEV
  (TODDR on 2018-03-20)</option>
<option
  
  value="RENEEB/perl-5.27.9"
>5.27.9 DEV
  (RENEEB on 2018-02-20)</option>
<option
  
  value="ABIGAIL/perl-5.27.8"
>5.27.8 DEV
  (ABIGAIL on 2018-01-20)</option>
<option
  
  value="BINGOS/perl-5.27.7"
>5.27.7 DEV
  (BINGOS on 2017-12-20)</option>
<option
  
  value="ETHER/perl-5.27.6"
>5.27.6 DEV
  (ETHER on 2017-11-20)</option>
<option
  
  value="SHAY/perl-5.27.5"
>5.27.5 DEV
  (SHAY on 2017-10-20)</option>
<option
  
  value="SHAY/perl-5.26.1"
>5.26.1
  (SHAY on 2017-09-22)</option>
<option
  
  value="SHAY/perl-5.24.3"
>5.24.3
  (SHAY on 2017-09-22)</option>
<option
  
  value="GENEHACK/perl-5.27.4"
>5.27.4 DEV
  (GENEHACK on 2017-09-20)</option>
<option
  
  value="WOLFSAGE/perl-5.27.3"
>5.27.3 DEV
  (WOLFSAGE on 2017-08-21)</option>
<option
  
  value="ARC/perl-5.27.2"
>5.27.2 DEV
  (ARC on 2017-07-20)</option>
<option
  
  value="SHAY/perl-5.24.2"
>5.24.2
  (SHAY on 2017-07-15)</option>
<option
  
  value="SHAY/perl-5.22.4-RC1"
>5.22.4-RC1 DEV
  (SHAY on 2017-07-01)</option>
<option
  
  value="EHERMAN/perl-5.27.1"
>5.27.1 DEV
  (EHERMAN on 2017-06-20)</option>
<option
  
  value="XSAWYERX/perl-5.26.0"
>5.26.0
  (XSAWYERX on 2017-05-30)</option>
<option
  
  value="RENEEB/perl-5.25.10"
>5.25.10 DEV
  (RENEEB on 2017-02-20)</option>
<option
  
  value="ABIGAIL/perl-5.25.9"
>5.25.9 DEV
  (ABIGAIL on 2017-01-20)</option>
<option
  
  value="SHAY/perl-5.22.3"
>5.22.3
  (SHAY on 2017-01-14)</option>
<option
  
  value="EXODIST/perl-5.25.7"
>5.25.7 DEV
  (EXODIST on 2016-11-20)</option>
<option
  
  value="ARC/perl-5.25.6"
>5.25.6 DEV
  (ARC on 2016-10-20)</option>
<option
  
  value="STEVAN/perl-5.25.5"
>5.25.5 DEV
  (STEVAN on 2016-09-20)</option>
<option
  
  value="BINGOS/perl-5.25.4"
>5.25.4 DEV
  (BINGOS on 2016-08-20)</option>
<option
  
  value="WOLFSAGE/perl-5.25.2"
>5.25.2 DEV
  (WOLFSAGE on 2016-06-20)</option>
<option
  
  value="RJBS/perl-5.24.0"
>5.24.0
  (RJBS on 2016-05-09)</option>
<option
  
  value="ABIGAIL/perl-5.23.9"
>5.23.9 DEV
  (ABIGAIL on 2016-03-20)</option>
<option
  
  value="STEVAN/perl-5.23.7"
>5.23.7 DEV
  (STEVAN on 2016-01-20)</option>
<option
  
  value="DAGOLDEN/perl-5.23.6"
>5.23.6 DEV
  (DAGOLDEN on 2015-12-21)</option>
<option
  
  value="SHAY/perl-5.22.1"
>5.22.1
  (SHAY on 2015-12-13)</option>
<option
  
  value="ABIGAIL/perl-5.23.5"
>5.23.5 DEV
  (ABIGAIL on 2015-11-20)</option>
<option
  
  value="PCM/perl-5.23.3"
>5.23.3 DEV
  (PCM on 2015-09-21)</option>
<option
  
  value="WOLFSAGE/perl-5.23.2"
>5.23.2 DEV
  (WOLFSAGE on 2015-08-20)</option>
<option
  
  value="WOLFSAGE/perl-5.23.1"
>5.23.1 DEV
  (WOLFSAGE on 2015-07-20)</option>
<option
  
  value="RJBS/perl-5.22.0"
>5.22.0
  (RJBS on 2015-06-01)</option>
<option
  
  value="RJBS/perl-5.22.0-RC2"
>5.22.0-RC2 DEV
  (RJBS on 2015-05-21)</option>
<option
  
  value="RJBS/perl-5.22.0-RC1"
>5.22.0-RC1 DEV
  (RJBS on 2015-05-19)</option>
<option
  
  value="WOLFSAGE/perl-5.21.8"
>5.21.8 DEV
  (WOLFSAGE on 2015-01-20)</option>
<option
  
  value="BINGOS/perl-5.21.6"
>5.21.6 DEV
  (BINGOS on 2014-11-20)</option>
<option
  
  value="ABIGAIL/perl-5.21.5"
>5.21.5 DEV
  (ABIGAIL on 2014-10-20)</option>
<option
  
  value="RJBS/perl-5.18.4"
>5.18.4
  (RJBS on 2014-10-02)</option>
<option
  
  value="RJBS/perl-5.18.3"
>5.18.3
  (RJBS on 2014-10-01)</option>
<option
  
  value="RJBS/perl-5.18.3-RC2"
>5.18.3-RC2 DEV
  (RJBS on 2014-09-27)</option>
<option
  
  value="RJBS/perl-5.18.3-RC1"
>5.18.3-RC1 DEV
  (RJBS on 2014-09-17)</option>
<option
  
  value="PCM/perl-5.21.3"
>5.21.3 DEV
  (PCM on 2014-08-21)</option>
<option
  
  value="ABIGAIL/perl-5.21.2"
>5.21.2 DEV
  (ABIGAIL on 2014-07-20)</option>
<option
  
  value="WOLFSAGE/perl-5.21.1"
>5.21.1 DEV
  (WOLFSAGE on 2014-06-20)</option>
<option
  
  value="RJBS/perl-5.20.0"
>5.20.0
  (RJBS on 2014-05-27)</option>
<option
  
  value="RJBS/perl-5.20.0-RC1"
>5.20.0-RC1 DEV
  (RJBS on 2014-05-17)</option>
<option
  
  value="ARC/perl-5.19.10"
>5.19.10 DEV
  (ARC on 2014-03-20)</option>
<option
  
  value="TONYC/perl-5.19.9"
>5.19.9 DEV
  (TONYC on 2014-02-20)</option>
<option
  
  value="RJBS/perl-5.18.2"
>5.18.2
  (RJBS on 2014-01-07)</option>
<option
  
  value="RJBS/perl-5.18.2-RC4"
>5.18.2-RC4 DEV
  (RJBS on 2013-12-22)</option>
<option
  
  value="ABIGAIL/perl-5.19.7"
>5.19.7 DEV
  (ABIGAIL on 2013-12-20)</option>
<option
  
  value="RJBS/perl-5.18.2-RC3"
>5.18.2-RC3 DEV
  (RJBS on 2013-12-19)</option>
<option
  
  value="RJBS/perl-5.18.2-RC2"
>5.18.2-RC2 DEV
  (RJBS on 2013-12-07)</option>
<option
  
  value="RJBS/perl-5.18.2-RC1"
>5.18.2-RC1 DEV
  (RJBS on 2013-12-02)</option>
<option
  
  value="BINGOS/perl-5.19.6"
>5.19.6 DEV
  (BINGOS on 2013-11-20)</option>
<option
  
  value="RJBS/perl-5.18.1"
>5.18.1
  (RJBS on 2013-08-12)</option>
<option
  
  value="RJBS/perl-5.18.1-RC3"
>5.18.1-RC3 DEV
  (RJBS on 2013-08-09)</option>
<option
  
  value="RJBS/perl-5.18.1-RC2"
>5.18.1-RC2 DEV
  (RJBS on 2013-08-04)</option>
<option
  
  value="RJBS/perl-5.18.1-RC1"
>5.18.1-RC1 DEV
  (RJBS on 2013-08-02)</option>
<option
  
  value="DAGOLDEN/perl-5.19.1"
>5.19.1 DEV
  (DAGOLDEN on 2013-06-21)</option>
<option
  
  value="RJBS/perl-5.18.0"
>5.18.0
  (RJBS on 2013-05-18)</option>
<option
  
  value="RJBS/perl-5.18.0-RC4"
>5.18.0-RC4 DEV
  (RJBS on 2013-05-16)</option>
<option
  
  value="RJBS/perl-5.18.0-RC3"
>5.18.0-RC3 DEV
  (RJBS on 2013-05-14)</option>
<option
  
  value="RJBS/perl-5.18.0-RC2"
>5.18.0-RC2 DEV
  (RJBS on 2013-05-12)</option>
<option
  
  value="RJBS/perl-5.18.0-RC1"
>5.18.0-RC1 DEV
  (RJBS on 2013-05-11)</option>
<option
  
  value="RJBS/perl-5.16.3"
>5.16.3
  (RJBS on 2013-03-11)</option>
<option
  
  value="DAPM/perl-5.14.4"
>5.14.4
  (DAPM on 2013-03-10)</option>
<option
  
  value="DAPM/perl-5.14.4-RC2"
>5.14.4-RC2 DEV
  (DAPM on 2013-03-07)</option>
<option
  
  value="RJBS/perl-5.16.3-RC1"
>5.16.3-RC1 DEV
  (RJBS on 2013-03-07)</option>
<option
  
  value="DAPM/perl-5.14.4-RC1"
>5.14.4-RC1 DEV
  (DAPM on 2013-03-05)</option>
<option
  
  value="BINGOS/perl-5.17.9"
>5.17.9 DEV
  (BINGOS on 2013-02-20)</option>
<option
  
  value="ARC/perl-5.17.8"
>5.17.8 DEV
  (ARC on 2013-01-20)</option>
<option
  
  value="DROLSKY/perl-5.17.7"
>5.17.7 DEV
  (DROLSKY on 2012-12-18)</option>
<option
  
  value="DOM/perl-5.12.5"
>5.12.5
  (DOM on 2012-11-10)</option>
<option
  
  value="DOM/perl-5.12.5-RC2"
>5.12.5-RC2 DEV
  (DOM on 2012-11-08)</option>
<option
  
  value="DOM/perl-5.12.5-RC1"
>5.12.5-RC1 DEV
  (DOM on 2012-11-03)</option>
<option
  
  value="RJBS/perl-5.16.2"
>5.16.2
  (RJBS on 2012-11-01)</option>
<option
  
  value="RJBS/perl-5.16.2-RC1"
>5.16.2-RC1 DEV
  (RJBS on 2012-10-27)</option>
<option
  
  value="FLORA/perl-5.17.5"
>5.17.5 DEV
  (FLORA on 2012-10-20)</option>
<option
  
  value="DOM/perl-5.14.3"
>5.14.3
  (DOM on 2012-10-12)</option>
<option
  
  value="DOM/perl-5.14.3-RC2"
>5.14.3-RC2 DEV
  (DOM on 2012-10-10)</option>
<option
  
  value="DOM/perl-5.14.3-RC1"
>5.14.3-RC1 DEV
  (DOM on 2012-09-26)</option>
<option
  
  value="FLORA/perl-5.17.4"
>5.17.4 DEV
  (FLORA on 2012-09-20)</option>
<option
  
  value="RJBS/perl-5.16.1"
>5.16.1
  (RJBS on 2012-08-08)</option>
<option
  
  value="RJBS/perl-5.16.1-RC1"
>5.16.1-RC1 DEV
  (RJBS on 2012-08-03)</option>
<option
  
  value="TONYC/perl-5.17.2"
>5.17.2 DEV
  (TONYC on 2012-07-20)</option>
<option
  
  value="DOY/perl-5.17.1"
>5.17.1 DEV
  (DOY on 2012-06-20)</option>
<option
  
  value="ZEFRAM/perl-5.17.0"
>5.17.0 DEV
  (ZEFRAM on 2012-05-26)</option>
<option
  
  value="RJBS/perl-5.16.0"
>5.16.0
  (RJBS on 2012-05-20)</option>
<option
  
  value="RJBS/perl-5.16.0-RC2"
>5.16.0-RC2 DEV
  (RJBS on 2012-05-16)</option>
<option
  
  value="RJBS/perl-5.16.0-RC1"
>5.16.0-RC1 DEV
  (RJBS on 2012-05-15)</option>
<option
  
  value="RJBS/perl-5.16.0-RC0"
>5.16.0-RC0 DEV
  (RJBS on 2012-05-11)</option>
<option
  
  value="ABIGAIL/perl-5.15.9"
>5.15.9 DEV
  (ABIGAIL on 2012-03-20)</option>
<option
  
  value="BINGOS/perl-5.15.7"
>5.15.7 DEV
  (BINGOS on 2012-01-20)</option>
<option
  
  value="DROLSKY/perl-5.15.6"
>5.15.6 DEV
  (DROLSKY on 2011-12-20)</option>
<option
  
  value="FLORA/perl-5.15.4"
>5.15.4 DEV
  (FLORA on 2011-10-20)</option>
<option
  
  value="FLORA/perl-5.14.2"
>5.14.2
  (FLORA on 2011-09-26)</option>
<option
  
  value="STEVAN/perl-5.15.3"
>5.15.3 DEV
  (STEVAN on 2011-09-21)</option>
<option
  
  value="FLORA/perl-5.14.2-RC1"
>5.14.2-RC1 DEV
  (FLORA on 2011-09-19)</option>
<option
  
  value="ZEFRAM/perl-5.15.1"
>5.15.1 DEV
  (ZEFRAM on 2011-07-20)</option>
<option
  
  value="DAGOLDEN/perl-5.15.0"
>5.15.0 DEV
  (DAGOLDEN on 2011-06-20)</option>
<option
  
  value="LBROCARD/perl-5.12.4"
>5.12.4
  (LBROCARD on 2011-06-20)</option>
<option
  
  value="JESSE/perl-5.14.1"
>5.14.1
  (JESSE on 2011-06-17)</option>
<option
  
  value="LBROCARD/perl-5.12.4-RC2"
>5.12.4-RC2 DEV
  (LBROCARD on 2011-06-15)</option>
<option
  
  value="JESSE/perl-5.14.1-RC1"
>5.14.1-RC1 DEV
  (JESSE on 2011-06-09)</option>
<option
  
  value="LBROCARD/perl-5.12.4-RC1"
>5.12.4-RC1 DEV
  (LBROCARD on 2011-06-08)</option>
<option
  
  value="JESSE/perl-5.14.0"
>5.14.0
  (JESSE on 2011-05-14)</option>
<option
  
  value="JESSE/perl-5.14.0-RC3"
>5.14.0-RC3 DEV
  (JESSE on 2011-05-11)</option>
<option
  
  value="JESSE/perl-5.14.0-RC2"
>5.14.0-RC2 DEV
  (JESSE on 2011-05-04)</option>
<option
  
  value="JESSE/perl-5.14.0-RC1"
>5.14.0-RC1 DEV
  (JESSE on 2011-04-20)</option>
<option
  
  value="FLORA/perl-5.13.11"
>5.13.11 DEV
  (FLORA on 2011-03-20)</option>
<option
  
  value="AVAR/perl-5.13.10"
>5.13.10 DEV
  (AVAR on 2011-02-20)</option>
<option
  
  value="RJBS/perl-5.12.3"
>5.12.3
  (RJBS on 2011-01-22)</option>
<option
  
  value="JESSE/perl-5.13.9"
>5.13.9 DEV
  (JESSE on 2011-01-21)</option>
<option
  
  value="RJBS/perl-5.12.3-RC3"
>5.12.3-RC3 DEV
  (RJBS on 2011-01-18)</option>
<option
  
  value="RJBS/perl-5.12.3-RC2"
>5.12.3-RC2 DEV
  (RJBS on 2011-01-15)</option>
<option
  
  value="RJBS/perl-5.12.3-RC1"
>5.12.3-RC1 DEV
  (RJBS on 2011-01-10)</option>
<option
  
  value="ZEFRAM/perl-5.13.8"
>5.13.8 DEV
  (ZEFRAM on 2010-12-19)</option>
<option
  
  value="BINGOS/perl-5.13.7"
>5.13.7 DEV
  (BINGOS on 2010-11-21)</option>
<option
  
  value="MIYAGAWA/perl-5.13.6"
>5.13.6 DEV
  (MIYAGAWA on 2010-10-21)</option>
<option
  
  value="JESSE/perl-5.12.2"
>5.12.2
  (JESSE on 2010-09-07)</option>
<option
  
  value="JESSE/perl-5.12.2-RC1"
>5.12.2-RC1 DEV
  (JESSE on 2010-08-31)</option>
<option
  
  value="FLORA/perl-5.13.4"
>5.13.4 DEV
  (FLORA on 2010-08-20)</option>
<option
  
  value="DAGOLDEN/perl-5.13.3"
>5.13.3 DEV
  (DAGOLDEN on 2010-07-20)</option>
<option
  
  value="MSTROUT/perl-5.13.2"
>5.13.2 DEV
  (MSTROUT on 2010-06-22)</option>
<option
  
  value="JESSE/perl-5.12.1"
>5.12.1
  (JESSE on 2010-05-16)</option>
<option
  
  value="JESSE/perl-5.12.1-RC2"
>5.12.1-RC2 DEV
  (JESSE on 2010-05-13)</option>
<option
  
  value="JESSE/perl-5.12.1-RC1"
>5.12.1-RC1 DEV
  (JESSE on 2010-05-10)</option>
<option
  
  value="LBROCARD/perl-5.13.0"
>5.13.0 DEV
  (LBROCARD on 2010-04-20)</option>
<option
  
  value="JESSE/perl-5.12.0"
>5.12.0
  (JESSE on 2010-04-12)</option>
<option
  
  value="JESSE/perl-5.12.0-RC5"
>5.12.0-RC5 DEV
  (JESSE on 2010-04-10)</option>
<option
  
  value="JESSE/perl-5.12.0-RC4"
>5.12.0-RC4 DEV
  (JESSE on 2010-04-07)</option>
<option
  
  value="JESSE/perl-5.12.0-RC3"
>5.12.0-RC3 DEV
  (JESSE on 2010-04-03)</option>
<option
  
  value="JESSE/perl-5.12.0-RC2"
>5.12.0-RC2 DEV
  (JESSE on 2010-04-01)</option>
<option
  
  value="JESSE/perl-5.12.0-RC1"
>5.12.0-RC1 DEV
  (JESSE on 2010-03-29)</option>
<option
  
  value="JESSE/perl-5.11.3"
>5.11.3 DEV
  (JESSE on 2009-12-21)</option>
<option
  
  value="LBROCARD/perl-5.11.2"
>5.11.2 DEV
  (LBROCARD on 2009-11-20)</option>
<option
  
  value="JESSE/perl-5.11.1"
>5.11.1 DEV
  (JESSE on 2009-10-20)</option>
<option
  
  value="JESSE/perl-5.11.0"
>5.11.0 DEV
  (JESSE on 2009-10-02)</option>
<option
  
  value="DAPM/perl-5.10.1"
>5.10.1
  (DAPM on 2009-08-23)</option>
<option
  
  value="DAPM/perl-5.10.1-RC2"
>5.10.1-RC2 DEV
  (DAPM on 2009-08-18)</option>
<option
  
  value="DAPM/perl-5.10.1-RC1"
>5.10.1-RC1 DEV
  (DAPM on 2009-08-06)</option>
<option
  
  value="NWCLARK/perl-5.8.9"
>5.8.9
  (NWCLARK on 2008-12-14)</option>
<option
  
  value="NWCLARK/perl-5.8.9-RC2"
>5.8.9-RC2 DEV
  (NWCLARK on 2008-12-06)</option>
<option
  
  value="NWCLARK/perl-5.8.9-RC1"
>5.8.9-RC1 DEV
  (NWCLARK on 2008-11-10)</option>
<option
  
  value="RGARCIA/perl-5.10.0"
>5.10.0
  (RGARCIA on 2007-12-18)</option>
<option
  
  value="RGARCIA/perl-5.9.5"
>5.9.5 DEV
  (RGARCIA on 2007-07-07)</option>
<option
  
  value="RGARCIA/perl-5.9.4"
>5.9.4 DEV
  (RGARCIA on 2006-08-15)</option>
<option
  
  value="NWCLARK/perl-5.8.8"
>5.8.8
  (NWCLARK on 2006-02-01)</option>
<option
  
  value="RGARCIA/perl-5.9.3"
>5.9.3 DEV
  (RGARCIA on 2006-01-28)</option>
<option
  
  value="NWCLARK/perl-5.8.8-RC1"
>5.8.8-RC1 DEV
  (NWCLARK on 2006-01-20)</option>
<option
  
  value="NWCLARK/perl-5.8.7"
>5.8.7
  (NWCLARK on 2005-05-30)</option>
<option
  
  value="NWCLARK/perl-5.8.7-RC1"
>5.8.7-RC1 DEV
  (NWCLARK on 2005-05-18)</option>
<option
  
  value="RGARCIA/perl-5.9.2"
>5.9.2 DEV
  (RGARCIA on 2005-04-01)</option>
<option
  
  value="NWCLARK/perl-5.8.6"
>5.8.6
  (NWCLARK on 2004-11-27)</option>
<option
  
  value="NWCLARK/perl-5.8.6-RC1"
>5.8.6-RC1 DEV
  (NWCLARK on 2004-11-11)</option>
<option
  
  value="NWCLARK/perl-5.8.5"
>5.8.5
  (NWCLARK on 2004-07-19)</option>
<option
  
  value="NWCLARK/perl-5.8.5-RC2"
>5.8.5-RC2 DEV
  (NWCLARK on 2004-07-08)</option>
<option
  
  value="NWCLARK/perl-5.8.5-RC1"
>5.8.5-RC1 DEV
  (NWCLARK on 2004-07-06)</option>
<option
  
  value="NWCLARK/perl-5.8.4"
>5.8.4
  (NWCLARK on 2004-04-21)</option>
<option
  
  value="NWCLARK/perl-5.8.4-RC2"
>5.8.4-RC2 DEV
  (NWCLARK on 2004-04-15)</option>
<option
  
  value="NWCLARK/perl-5.8.4-RC1"
>5.8.4-RC1 DEV
  (NWCLARK on 2004-04-05)</option>
<option
  
  value="RGARCIA/perl-5.9.1"
>5.9.1 DEV
  (RGARCIA on 2004-03-16)</option>
<option
  
  value="LBROCARD/perl5.005_04"
>5.005_04
  (LBROCARD on 2004-02-23)</option>
<option
  
  value="NWCLARK/perl-5.8.3"
>5.8.3
  (NWCLARK on 2004-01-14)</option>
<option
  
  value="NWCLARK/perl-5.8.3-RC1"
>5.8.3-RC1 DEV
  (NWCLARK on 2004-01-07)</option>
<option
  
  value="RGARCIA/perl-5.6.2"
>5.6.2
  (RGARCIA on 2003-11-15)</option>
<option
  
  value="NWCLARK/perl-5.8.2"
>5.8.2
  (NWCLARK on 2003-11-05)</option>
<option
  
  value="NWCLARK/perl-5.8.2-RC2"
>5.8.2-RC2 DEV
  (NWCLARK on 2003-11-03)</option>
<option
  
  value="NWCLARK/perl-5.8.2-RC1"
>5.8.2-RC1 DEV
  (NWCLARK on 2003-10-27)</option>
<option
  
  value="HVDS/perl-5.9.0"
>5.9.0 DEV
  (HVDS on 2003-10-27)</option>
<option
  
  value="JHI/perl-5.8.1"
>5.8.1
  (JHI on 2003-09-25)</option>
<option
  
  value="JHI/perl-5.8.0"
>5.8.0
  (JHI on 2002-07-18)</option>
<option
  
  value="JHI/perl-5.7.3"
>5.7.3 DEV
  (JHI on 2002-03-05)</option>
<option
  
  value="JHI/perl-5.7.2"
>5.7.2 DEV
  (JHI on 2001-07-13)</option>
<option
  
  value="GSAR/perl-5.6.1"
>5.6.1
  (GSAR on 2001-04-09)</option>
<option
  
  value="GSAR/perl-5.6.1-TRIAL3"
>5.6.1-TRIAL3 DEV
  (GSAR on 2001-03-19)</option>
<option
  
  value="GSAR/perl-5.6.1-TRIAL2"
>5.6.1-TRIAL2 DEV
  (GSAR on 2001-01-31)</option>
<option
  
  value="GSAR/perl-5.6.1-TRIAL1"
>5.6.1-TRIAL1 DEV
  (GSAR on 2000-12-18)</option>
<option
  
  value="JHI/perl-5.7.0"
>5.7.0 DEV
  (JHI on 2000-09-02)</option>
<option
  
  value="GSAR/perl-5.6.0"
>5.6.0
  (GSAR on 2000-03-23)</option>
<option
  
  value="CHIPS/perl5.004_05"
>5.004_05
  (CHIPS on 1999-04-29)</option>
<option
  
  value="GBARR/perl5.005_03"
>5.005_03
  (GBARR on 1999-03-29)</option>
<option
  
  value="GSAR/perl5.005_02"
>5.005_02
  (GSAR on 1998-08-08)</option>
<option
  
  value="GSAR/perl5.005_01"
>5.005_01
  (GSAR on 1998-07-27)</option>
<option
  
  value="GSAR/perl5.005"
>5.005
  (GSAR on 1998-07-23)</option>
<option
  
  value="TIMB/perl5.004_04"
>5.004_04
  (TIMB on 1997-10-15)</option>
<option
  
  value="TIMB/perl5.004_03"
>5.004_03
  (TIMB on 1997-09-05)</option>
<option
  
  value="TIMB/perl5.004_02"
>5.004_02
  (TIMB on 1997-08-07)</option>
<option
  
  value="TIMB/perl5.004_01"
>5.004_01
  (TIMB on 1997-06-13)</option>
<option
  
  value="CHIPS/perl5.004"
>5.004
  (CHIPS on 1997-05-15)</option>
<optgroup label="BackPAN">'
<option
  
  value="PEVANS/perl-5.38.1a"
>5.38.1a
  (PEVANS on 2023-11-25)</option>
<option
  
  value="PEVANS/perl-5.36.2a"
>5.36.2a
  (PEVANS on 2023-11-25)</option>
<option
  
  value="PEVANS/perl-5.34.2a"
>5.34.2a
  (PEVANS on 2023-11-25)</option>
<option
  
  value="PEVANS/perl-5.38.1"
>5.38.1
  (PEVANS on 2023-11-25)</option>
<option
  
  value="PEVANS/perl-5.36.2"
>5.36.2
  (PEVANS on 2023-11-25)</option>
<option
  
  value="PEVANS/perl-5.34.2"
>5.34.2
  (PEVANS on 2023-11-25)</option>
<option
  
  value="NEILB/perl-5.37.3"
>5.37.3 DEV
  (NEILB on 2022-08-20)</option>
<option
  
  value="NEILB/perl-5.35.7"
>5.35.7 DEV
  (NEILB on 2021-12-20)</option>
<option
  
  value="NEILB/perl-5.35.2"
>5.35.2 DEV
  (NEILB on 2021-07-23)</option>
<option
  
  value="TOMHUKINS/perl-5.33.4"
>5.33.4 DEV
  (TOMHUKINS on 2020-11-20)</option>
<option
  
  value="TOMHUKINS/perl-5.31.3"
>5.31.3 DEV
  (TOMHUKINS on 2019-08-20)</option>
<option
  
  value="SHAY/perl-5.26.1-RC1"
>5.26.1-RC1 DEV
  (SHAY on 2017-09-10)</option>
<option
  
  value="SHAY/perl-5.24.3-RC1"
>5.24.3-RC1 DEV
  (SHAY on 2017-09-10)</option>
<option
  
  value="SHAY/perl-5.22.4"
>5.22.4
  (SHAY on 2017-07-15)</option>
<option
  
  value="SHAY/perl-5.24.2-RC1"
>5.24.2-RC1 DEV
  (SHAY on 2017-07-01)</option>
<option
  
  value="XSAWYERX/perl-5.27.0"
>5.27.0 DEV
  (XSAWYERX on 2017-05-31)</option>
<option
  
  value="XSAWYERX/perl-5.26.0-RC2"
>5.26.0-RC2 DEV
  (XSAWYERX on 2017-05-23)</option>
<option
  
  value="XSAWYERX/perl-5.26.0-RC1"
>5.26.0-RC1 DEV
  (XSAWYERX on 2017-05-11)</option>
<option
  
  value="XSAWYERX/perl-5.25.12"
>5.25.12 DEV
  (XSAWYERX on 2017-04-20)</option>
<option
  
  value="XSAWYERX/perl-5.25.11"
>5.25.11 DEV
  (XSAWYERX on 2017-03-20)</option>
<option
  
  value="SHAY/perl-5.24.1"
>5.24.1
  (SHAY on 2017-01-14)</option>
<option
  
  value="SHAY/perl-5.24.1-RC5"
>5.24.1-RC5 DEV
  (SHAY on 2017-01-02)</option>
<option
  
  value="SHAY/perl-5.22.3-RC5"
>5.22.3-RC5 DEV
  (SHAY on 2017-01-02)</option>
<option
  
  value="XSAWYERX/perl-5.25.8"
>5.25.8 DEV
  (XSAWYERX on 2016-12-20)</option>
<option
  
  value="SHAY/perl-5.24.1-RC4"
>5.24.1-RC4 DEV
  (SHAY on 2016-10-12)</option>
<option
  
  value="SHAY/perl-5.22.3-RC4"
>5.22.3-RC4 DEV
  (SHAY on 2016-10-12)</option>
<option
  
  value="SHAY/perl-5.24.1-RC3"
>5.24.1-RC3 DEV
  (SHAY on 2016-08-11)</option>
<option
  
  value="SHAY/perl-5.22.3-RC3"
>5.22.3-RC3 DEV
  (SHAY on 2016-08-11)</option>
<option
  
  value="SHAY/perl-5.24.1-RC2"
>5.24.1-RC2 DEV
  (SHAY on 2016-07-25)</option>
<option
  
  value="SHAY/perl-5.22.3-RC2"
>5.22.3-RC2 DEV
  (SHAY on 2016-07-25)</option>
<option
  
  value="SHAY/perl-5.25.3"
>5.25.3 DEV
  (SHAY on 2016-07-20)</option>
<option
  
  value="SHAY/perl-5.24.1-RC1"
>5.24.1-RC1 DEV
  (SHAY on 2016-07-17)</option>
<option
  
  value="SHAY/perl-5.22.3-RC1"
>5.22.3-RC1 DEV
  (SHAY on 2016-07-17)</option>
<option
  
  value="XSAWYERX/perl-5.25.1"
>5.25.1 DEV
  (XSAWYERX on 2016-05-20)</option>
<option
  
  value="RJBS/perl-5.25.0"
>5.25.0 DEV
  (RJBS on 2016-05-09)</option>
<option
  
  value="RJBS/perl-5.24.0-RC5"
>5.24.0-RC5 DEV
  (RJBS on 2016-05-04)</option>
<option
  
  value="RJBS/perl-5.24.0-RC4"
>5.24.0-RC4 DEV
  (RJBS on 2016-05-02)</option>
<option
  
  value="SHAY/perl-5.22.2"
>5.22.2
  (SHAY on 2016-04-29)</option>
<option
  
  value="RJBS/perl-5.24.0-RC3"
>5.24.0-RC3 DEV
  (RJBS on 2016-04-27)</option>
<option
  
  value="RJBS/perl-5.24.0-RC2"
>5.24.0-RC2 DEV
  (RJBS on 2016-04-23)</option>
<option
  
  value="RJBS/perl-5.24.0-RC1"
>5.24.0-RC1 DEV
  (RJBS on 2016-04-14)</option>
<option
  
  value="SHAY/perl-5.22.2-RC1"
>5.22.2-RC1 DEV
  (SHAY on 2016-04-10)</option>
<option
  
  value="XSAWYERX/perl-5.23.8"
>5.23.8 DEV
  (XSAWYERX on 2016-02-20)</option>
<option
  
  value="SHAY/perl-5.22.1-RC4"
>5.22.1-RC4 DEV
  (SHAY on 2015-12-08)</option>
<option
  
  value="SHAY/perl-5.22.1-RC3"
>5.22.1-RC3 DEV
  (SHAY on 2015-12-02)</option>
<option
  
  value="SHAY/perl-5.22.1-RC2"
>5.22.1-RC2 DEV
  (SHAY on 2015-11-15)</option>
<option
  
  value="SHAY/perl-5.22.1-RC1"
>5.22.1-RC1 DEV
  (SHAY on 2015-10-31)</option>
<option
  
  value="SHAY/perl-5.23.4"
>5.23.4 DEV
  (SHAY on 2015-10-20)</option>
<option
  
  value="SHAY/perl-5.20.3"
>5.20.3
  (SHAY on 2015-09-12)</option>
<option
  
  value="SHAY/perl-5.20.3-RC2"
>5.20.3-RC2 DEV
  (SHAY on 2015-08-29)</option>
<option
  
  value="SHAY/perl-5.20.3-RC1"
>5.20.3-RC1 DEV
  (SHAY on 2015-08-22)</option>
<option
  
  value="RJBS/perl-5.23.0"
>5.23.0 DEV
  (RJBS on 2015-06-20)</option>
<option
  
  value="SHAY/perl-5.21.11"
>5.21.11 DEV
  (SHAY on 2015-04-20)</option>
<option
  
  value="SHAY/perl-5.21.10"
>5.21.10 DEV
  (SHAY on 2015-03-20)</option>
<option
  
  value="XSAWYERX/perl-5.21.9"
>5.21.9 DEV
  (XSAWYERX on 2015-02-21)</option>
<option
  
  value="SHAY/perl-5.20.2"
>5.20.2
  (SHAY on 2015-02-14)</option>
<option
  
  value="SHAY/perl-5.20.2-RC1"
>5.20.2-RC1 DEV
  (SHAY on 2015-02-01)</option>
<option
  
  value="CORION/perl-5.21.7"
>5.21.7 DEV
  (CORION on 2014-12-20)</option>
<option
  
  value="SHAY/perl-5.21.4"
>5.21.4 DEV
  (SHAY on 2014-09-20)</option>
<option
  
  value="SHAY/perl-5.20.1"
>5.20.1
  (SHAY on 2014-09-14)</option>
<option
  
  value="SHAY/perl-5.20.1-RC2"
>5.20.1-RC2 DEV
  (SHAY on 2014-09-07)</option>
<option
  
  value="SHAY/perl-5.20.1-RC1"
>5.20.1-RC1 DEV
  (SHAY on 2014-08-25)</option>
<option
  
  value="RJBS/perl-5.21.0"
>5.21.0 DEV
  (RJBS on 2014-05-27)</option>
<option
  
  value="SHAY/perl-5.19.11"
>5.19.11 DEV
  (SHAY on 2014-04-20)</option>
<option
  
  value="RJBS/perl-5.19.8"
>5.19.8 DEV
  (RJBS on 2014-01-20)</option>
<option
  
  value="SHAY/perl-5.19.5"
>5.19.5 DEV
  (SHAY on 2013-10-20)</option>
<option
  
  value="SHAY/perl-5.19.4"
>5.19.4 DEV
  (SHAY on 2013-09-20)</option>
<option
  
  value="SHAY/perl-5.19.3"
>5.19.3 DEV
  (SHAY on 2013-08-20)</option>
<option
  
  value="ARISTOTLE/perl-5.19.2"
>5.19.2 DEV
  (ARISTOTLE on 2013-07-22)</option>
<option
  
  value="RJBS/perl-5.19.0"
>5.19.0 DEV
  (RJBS on 2013-05-20)</option>
<option
  
  value="RJBS/perl-5.17.11"
>5.17.11 DEV
  (RJBS on 2013-04-21)</option>
<option
  
  value="CORION/perl-5.17.10"
>5.17.10 DEV
  (CORION on 2013-03-21)</option>
<option
  
  value="RJBS/perl-5.17.6"
>5.17.6 DEV
  (RJBS on 2012-11-21)</option>
<option
  
  value="SHAY/perl-5.17.3"
>5.17.3 DEV
  (SHAY on 2012-08-20)</option>
<option
  
  value="CORION/perl-5.15.8"
>5.15.8 DEV
  (CORION on 2012-02-20)</option>
<option
  
  value="SHAY/perl-5.15.5"
>5.15.5 DEV
  (SHAY on 2011-11-20)</option>
<option
  
  value="RJBS/perl-5.15.2"
>5.15.2 DEV
  (RJBS on 2011-08-21)</option>
<option
  
  value="SHAY/perl-5.13.5"
>5.13.5 DEV
  (SHAY on 2010-09-19)</option>
<option
  
  value="RJBS/perl-5.13.1"
>5.13.1 DEV
  (RJBS on 2010-05-20)</option>
<option
  
  value="JESSE/perl-5.12.0-RC0"
>5.12.0-RC0 DEV
  (JESSE on 2010-03-21)</option>
<option
  
  value="SHAY/perl-5.11.5"
>5.11.5 DEV
  (SHAY on 2010-02-21)</option>
<option
  
  value="RJBS/perl-5.11.4"
>5.11.4 DEV
  (RJBS on 2010-01-20)</option>
<option
  
  value="RGARCIA/perl-5.10.0-RC2"
>5.10.0-RC2 DEV
  (RGARCIA on 2007-11-25)</option>
<option
  
  value="RGARCIA/perl-5.10.0-RC1"
>5.10.0-RC1 DEV
  (RGARCIA on 2007-11-17)</option>
<option
  
  value="LBROCARD/perl5.005_04-RC2"
>5.005_04-RC2 DEV
  (LBROCARD on 2004-02-18)</option>
<option
  
  value="LBROCARD/perl5.005_04-RC1"
>5.005_04-RC1 DEV
  (LBROCARD on 2004-02-04)</option>
<option
  
  value="LBROCARD/perl5.005_03-MAINT22213"
>5.005_03-MAINT22213 DEV
  (LBROCARD on 2004-01-27)</option>
<option
  
  value="LBROCARD/perl5.005_03-MAINT22178"
>5.005_03-MAINT22178 DEV
  (LBROCARD on 2004-01-20)</option>
<option
  
  value="LBROCARD/perl5.005_03-MAINT21792"
>5.005_03-MAINT21792 DEV
  (LBROCARD on 2003-12-05)</option>
<option
  
  value="RGARCIA/perl-5.6.2-RC1"
>5.6.2-RC1 DEV
  (RGARCIA on 2003-11-08)</option>
<option
  
  value="JHI/perl-5.8.1-RC5"
>5.8.1-RC5 DEV
  (JHI on 2003-09-22)</option>
<option
  
  value="JHI/perl-5.8.1-RC4"
>5.8.1-RC4 DEV
  (JHI on 2003-08-01)</option>
<option
  
  value="JHI/perl-5.8.1-RC3"
>5.8.1-RC3 DEV
  (JHI on 2003-07-30)</option>
<option
  
  value="JHI/perl-5.8.1-RC2"
>5.8.1-RC2 DEV
  (JHI on 2003-07-11)</option>
<option
  
  value="JHI/perl-5.8.1-RC1"
>5.8.1-RC1 DEV
  (JHI on 2003-07-10)</option>
<option
  
  value="JHI/perl-5.8.0-RC3"
>5.8.0-RC3 DEV
  (JHI on 2002-07-14)</option>
<option
  
  value="JHI/perl-5.8.0-RC2"
>5.8.0-RC2 DEV
  (JHI on 2002-06-21)</option>
<option
  
  value="JHI/perl-5.8.0-RC1"
>5.8.0-RC1 DEV
  (JHI on 2002-06-01)</option>
<option
  
  value="JHI/perl-5.7.1"
>5.7.1 DEV
  (JHI on 2001-04-10)</option>
<option
  
  value="GSAR/perl-5.5.670"
>5.5.670 DEV
  (GSAR on 2000-03-01)</option>
<option
  
  value="GSAR/perl5.5.660"
>5.5.660 DEV
  (GSAR on 2000-02-22)</option>
<option
  
  value="GSAR/perl5.5.650"
>5.5.650 DEV
  (GSAR on 2000-02-08)</option>
<option
  
  value="GSAR/perl5.5.640"
>5.5.640 DEV
  (GSAR on 2000-02-02)</option>
<option
  
  value="GSAR/perl5.005_63"
>5.005_63 DEV
  (GSAR on 1999-12-09)</option>
<option
  
  value="GSAR/perl5.005_62"
>5.005_62 DEV
  (GSAR on 1999-10-15)</option>
<option
  
  value="GSAR/perl5.005_61"
>5.005_61 DEV
  (GSAR on 1999-08-22)</option>
<option
  
  value="GSAR/perl5.005_60"
>5.005_60 DEV
  (GSAR on 1999-08-02)</option>
<option
  
  value="GSAR/perl5.005_59"
>5.005_59 DEV
  (GSAR on 1999-08-02)</option>
<option
  
  value="GSAR/perl5.005_58"
>5.005_58 DEV
  (GSAR on 1999-07-27)</option>
<option
  
  value="GSAR/perl5.005_57"
>5.005_57 DEV
  (GSAR on 1999-05-25)</option>
<option
  
  value="CHIPS/perl5.004_05-MAINT_TRIAL_9"
>5.004_05-MAINT_TRIAL_9 DEV
  (CHIPS on 1999-04-27)</option>
<option
  
  value="GBARR/perl5.005_03-MAINT_TRIAL_6"
>5.005_03-MAINT_TRIAL_6 DEV
  (GBARR on 1999-03-05)</option>
<option
  
  value="GSAR/perl5.005_56"
>5.005_56 DEV
  (GSAR on 1999-03-01)</option>
<option
  
  value="GSAR/perl5.005_55"
>5.005_55 DEV
  (GSAR on 1999-02-16)</option>
<option
  
  value="GBARR/perl5.005_03-MAINT_TRIAL_5"
>5.005_03-MAINT_TRIAL_5 DEV
  (GBARR on 1999-01-29)</option>
<option
  
  value="GBARR/perl5.005_03-MAINT_TRIAL_4"
>5.005_03-MAINT_TRIAL_4 DEV
  (GBARR on 1999-01-26)</option>
<option
  
  value="GBARR/perl5.005_03-MAINT_TRIAL_3"
>5.005_03-MAINT_TRIAL_3 DEV
  (GBARR on 1999-01-17)</option>
<option
  
  value="GBARR/perl5.005_03-MAINT_TRIAL_2"
>5.005_03-MAINT_TRIAL_2 DEV
  (GBARR on 1999-01-03)</option>
<option
  
  value="TIMB/perl5.004_05-MAINT_TRIAL_8"
>5.004_05-MAINT_TRIAL_8 DEV
  (TIMB on 1998-12-03)</option>
<option
  
  value="GSAR/perl5.005_54"
>5.005_54 DEV
  (GSAR on 1998-11-30)</option>
<option
  
  value="GBARR/perl5.005_03-MAINT_TRIAL_1"
>5.005_03-MAINT_TRIAL_1 DEV
  (GBARR on 1998-11-30)</option>
<option
  
  value="TIMB/perl5.004_05-MAINT_TRIAL_7"
>5.004_05-MAINT_TRIAL_7 DEV
  (TIMB on 1998-11-22)</option>
<option
  
  value="GSAR/perl5.005_53"
>5.005_53 DEV
  (GSAR on 1998-10-31)</option>
<option
  
  value="TIMB/perl5.004_05-MAINT_TRIAL_6"
>5.004_05-MAINT_TRIAL_6 DEV
  (TIMB on 1998-10-09)</option>
<option
  
  value="GSAR/perl5.005_52"
>5.005_52 DEV
  (GSAR on 1998-09-25)</option>
<option
  
  value="GSAR/perl5.005_51"
>5.005_51 DEV
  (GSAR on 1998-08-10)</option>
<option
  
  value="GSAR/perl5.005_02-TRIAL2"
>5.005_02-TRIAL2 DEV
  (GSAR on 1998-08-05)</option>
<option
  
  value="GSAR/perl5.005_02-TRIAL1"
>5.005_02-TRIAL1 DEV
  (GSAR on 1998-08-02)</option>
<option
  
  value="GSAR/perl5.005_50"
>5.005_50 DEV
  (GSAR on 1998-07-26)</option>
<option
  
  value="GSAR/perl5.005-beta2"
>5.005-beta2
  (GSAR on 1998-07-21)</option>
<option
  
  value="TIMB/perl5.004_05-MAINT_TRIAL_5"
>5.004_05-MAINT_TRIAL_5 DEV
  (TIMB on 1998-07-21)</option>
<option
  
  value="GSAR/perl5.005-beta1"
>5.005-beta1
  (GSAR on 1998-07-15)</option>
<option
  
  value="GSAR/perl5.004_74"
>5.004_74 DEV
  (GSAR on 1998-07-14)</option>
<option
  
  value="GSAR/perl5.004_73"
>5.004_73 DEV
  (GSAR on 1998-07-13)</option>
<option
  
  value="GSAR/perl5.004_72"
>5.004_72 DEV
  (GSAR on 1998-07-12)</option>
<option
  
  value="GSAR/perl5.004_71"
>5.004_71 DEV
  (GSAR on 1998-07-09)</option>
<option
  
  value="GSAR/perl5.004_70"
>5.004_70 DEV
  (GSAR on 1998-07-06)</option>
<option
  
  value="GSAR/perl5.004_69"
>5.004_69 DEV
  (GSAR on 1998-06-29)</option>
<option
  
  value="GSAR/perl5.004_68"
>5.004_68 DEV
  (GSAR on 1998-06-23)</option>
<option
  
  value="GSAR/perl5.004_67"
>5.004_67 DEV
  (GSAR on 1998-06-15)</option>
<option
  
  value="MICB/perl5.004_66"
>5.004_66 DEV
  (MICB on 1998-05-29)</option>
<option
  
  value="TIMB/perl5.004_04-m4"
>5.004_04-m4 DEV
  (TIMB on 1998-05-19)</option>
<option
  
  value="TIMB/perl5.004_04-m3"
>5.004_04-m3 DEV
  (TIMB on 1998-05-15)</option>
<option
  
  value="MICB/perl5.004_65"
>5.004_65 DEV
  (MICB on 1998-05-15)</option>
<option
  
  value="TIMB/perl5.004_04-m2"
>5.004_04-m2 DEV
  (TIMB on 1998-05-01)</option>
<option
  
  value="MICB/perl5.004_64"
>5.004_64 DEV
  (MICB on 1998-04-03)</option>
<option
  
  value="MICB/perl5.004_63"
>5.004_63 DEV
  (MICB on 1998-03-17)</option>
<option
  
  value="MICB/perl5.004_62"
>5.004_62 DEV
  (MICB on 1998-03-06)</option>
<option
  
  value="TIMB/perl5.004m5t1"
>5.004m5t1
  (TIMB on 1998-03-04)</option>
<option
  
  value="MICB/perl5.004_61"
>5.004_61 DEV
  (MICB on 1998-02-27)</option>
<option
  
  value="MICB/perl5.004_60"
>5.004_60 DEV
  (MICB on 1998-02-20)</option>
<option
  
  value="MICB/perl5.004_59"
>5.004_59 DEV
  (MICB on 1998-02-13)</option>
<option
  
  value="MICB/perl5.004_58"
>5.004_58 DEV
  (MICB on 1998-02-06)</option>
<option
  
  value="MICB/perl5.004_57"
>5.004_57 DEV
  (MICB on 1998-02-03)</option>
<option
  
  value="MICB/perl5.004_56"
>5.004_56 DEV
  (MICB on 1997-12-18)</option>
<option
  
  value="MICB/perl5.004_55"
>5.004_55 DEV
  (MICB on 1997-11-25)</option>
<option
  
  value="MICB/perl5.004_54"
>5.004_54 DEV
  (MICB on 1997-11-14)</option>
<option
  
  value="MICB/perl5.004_53"
>5.004_53 DEV
  (MICB on 1997-10-16)</option>
<option
  
  value="MICB/perl5.004_52"
>5.004_52 DEV
  (MICB on 1997-10-15)</option>
<option
  
  value="TIMB/perl5.004m4t4"
>5.004m4t4
  (TIMB on 1997-10-14)</option>
<option
  
  value="TIMB/perl5.004m4t3"
>5.004m4t3
  (TIMB on 1997-10-09)</option>
<option
  
  value="MICB/perl5.004_51"
>5.004_51 DEV
  (MICB on 1997-10-02)</option>
<option
  
  value="TIMB/perl5.004m4t2"
>5.004m4t2
  (TIMB on 1997-09-23)</option>
<option
  
  value="TIMB/perl5.004m4t1"
>5.004m4t1
  (TIMB on 1997-09-19)</option>
<option
  
  value="TIMB/perl5.004m3t2"
>5.004m3t2
  (TIMB on 1997-09-05)</option>
<option
  
  value="CHIPS/perl5.003_99a"
>5.003_99a DEV
  (CHIPS on 1997-05-09)</option>
<option
  
  value="CHIPS/perl5.003_99"
>5.003_99 DEV
  (CHIPS on 1997-05-01)</option>
<option
  
  value="CHIPS/perl5.003_98"
>5.003_98 DEV
  (CHIPS on 1997-04-30)</option>
<option
  
  value="CHIPS/perl5.003_97j"
>5.003_97j DEV
  (CHIPS on 1997-04-28)</option>
<option
  
  value="CHIPS/perl5.003_97i"
>5.003_97i DEV
  (CHIPS on 1997-04-25)</option>
<option
  
  value="CHIPS/perl5.003_97h"
>5.003_97h DEV
  (CHIPS on 1997-04-24)</option>
<option
  
  value="CHIPS/perl5.003_97"
>5.003_97 DEV
  (CHIPS on 1997-04-03)</option>
<option
  
  value="CHIPS/perl5.003_96"
>5.003_96 DEV
  (CHIPS on 1997-04-01)</option>
<option
  
  value="CHIPS/perl5.003_95"
>5.003_95 DEV
  (CHIPS on 1997-03-25)</option>
<option
  
  value="CHIPS/perl5.003_94"
>5.003_94 DEV
  (CHIPS on 1997-03-22)</option>
<option
  
  value="CHIPS/perl5.003_93"
>5.003_93 DEV
  (CHIPS on 1997-03-10)</option>
<option
  
  value="CHIPS/perl5.003_92"
>5.003_92 DEV
  (CHIPS on 1997-03-06)</option>
<option
  
  value="CHIPS/perl5.003_91"
>5.003_91 DEV
  (CHIPS on 1997-03-01)</option>
<option
  
  value="CHIPS/perl5.003_90"
>5.003_90 DEV
  (CHIPS on 1997-02-25)</option>
<option
  
  value="CHIPS/perl5.003_28"
>5.003_28
  (CHIPS on 1997-02-21)</option>
<option
  
  value="CHIPS/perl5.003_27"
>5.003_27
  (CHIPS on 1997-02-18)</option>
<option
  
  value="CHIPS/perl5.003_26"
>5.003_26
  (CHIPS on 1997-02-10)</option>
<option
  
  value="CHIPS/perl5.003_25"
>5.003_25
  (CHIPS on 1997-02-04)</option>
<option
  
  value="CHIPS/perl5.003_24"
>5.003_24
  (CHIPS on 1997-01-29)</option>
<option
  
  value="CHIPS/perl5.003_23"
>5.003_23
  (CHIPS on 1997-01-25)</option>
<option
  
  value="CHIPS/perl5.003_22"
>5.003_22
  (CHIPS on 1997-01-16)</option>
<option
  
  value="CHIPS/perl5.003_21"
>5.003_21
  (CHIPS on 1997-01-15)</option>
<option
  
  value="CHIPS/perl5.003_20"
>5.003_20
  (CHIPS on 1997-01-08)</option>
<option
  
  value="CHIPS/perl5.003_19"
>5.003_19
  (CHIPS on 1997-01-04)</option>
<option
  
  value="CHIPS/perl5.003_18"
>5.003_18
  (CHIPS on 1996-12-31)</option>
<option
  
  value="CHIPS/perl5.003_17"
>5.003_17
  (CHIPS on 1996-12-27)</option>
<option
  
  value="CHIPS/perl5.003_16"
>5.003_16
  (CHIPS on 1996-12-24)</option>
<option
  
  value="CHIPS/perl5.003_15"
>5.003_15
  (CHIPS on 1996-12-23)</option>
<option
  
  value="CHIPS/perl-5.003_13"
>5.003_13
  (CHIPS on 1996-12-20)</option>
<option
  
  value="CHIPS/perl5.003_12"
>5.003_12
  (CHIPS on 1996-12-19)</option>
<option
  
  value="CHIPS/perl5.003_11"
>5.003_11
  (CHIPS on 1996-12-06)</option>
<option
  
  value="CHIPS/perl5.003_10"
>5.003_10
  (CHIPS on 1996-11-30)</option>
<option
  
  value="CHIPS/perl5.003_09"
>5.003_09
  (CHIPS on 1996-11-26)</option>
<option
  
  value="CHIPS/perl5.003_08"
>5.003_08
  (CHIPS on 1996-11-19)</option>
<option
  
  value="ANDYD/perl5.003_07"
>5.003_07
  (ANDYD on 1996-10-11)</option>
<option
  
  value="ANDYD/perl5.003_06"
>5.003_06
  (ANDYD on 1996-10-08)</option>
<option
  
  value="ANDYD/perl5.003_05"
>5.003_05
  (ANDYD on 1996-09-12)</option>
<option
  
  value="ANDYD/perl5.003_04"
>5.003_04
  (ANDYD on 1996-09-02)</option>
<option
  
  value="ANDYD/perl5.003_03"
>5.003_03
  (ANDYD on 1996-08-28)</option>
<option
  
  value="NI-S/perl5.003_02"
>5.003_02
  (NI-S on 1996-08-10)</option>
<option
  
  value="NI-S/perl5.003_02a"
>5.003_02a DEV
  (NI-S on 1996-08-08)</option>
<option
  
  value="LWALL/perl5.002b3"
>5.002b3
  (LWALL on 1996-02-03)</option>
</optgroup>
</select>
    <a data-keyboard-shortcut="g d" class="release-name" href="https://metacpan.org/dist/perl">perl-5.38.2</a>
  </div>
<span class="river-gauge-gauge">
  <svg width="24px"
       height="15px"
       version="1.1"
       xmlns="http://www.w3.org/2000/svg"
       xmlns:xlink="http://www.w3.org/1999/xlink">

    <g>
      <title>        River stage five &#10;
          • 11292 direct dependents &#10;          • 32664 total dependents
      </title>

      <rect x="0"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="5"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="10"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="15"  y="0" width="4" height="15" fill="#7ea3f2" />
      <rect x="20"  y="0" width="4" height="15" fill="#7ea3f2" />
    </g>
  </svg>

</span>
<div id="perl-fav" class="logged_in">
<form action="https://metacpan.org/account/favorite/add" style="display: inline" onsubmit="return favDistribution(this)">
    <input type="hidden" name="remove" value="0">
    <input type="hidden" name="release" value="perl-5.38.2">
    <input type="hidden" name="author" value="PEVANS">
    <input type="hidden" name="distribution" value="perl">
    <button type="submit" class="favorite highlight"><span>421</span> ++</button>
</form>
</div>
<div class="logged_out">
<a href="CORE.html" onclick="alert('Please sign in to add favorites'); return false" class="favorite highlight">
<span>421</span> ++</a>
</div>
   / <span>perlfunc</span>
</div>
          </div>
          <main class="content">


<nav class="toc">
  <div class="toc-header"><strong>Contents</strong></div>
<ul>
  <li><a href="CORE.html#NAME">NAME </a></li>
  <li><a href="CORE.html#DESCRIPTION">DESCRIPTION</a>
    <ul>
      <li><a href="CORE.html#Perl-Functions-by-Category">Perl Functions by Category </a></li>
      <li><a href="CORE.html#Portability">Portability   </a></li>
      <li><a href="CORE.html#Alphabetical-Listing-of-Perl-Functions">Alphabetical Listing of Perl Functions</a></li>
      <li><a href="CORE.html#Non-function-Keywords-by-Cross-reference">Non-function Keywords by Cross-reference</a>
        <ul>
          <li><a href="CORE.html#perldata">perldata</a></li>
          <li><a href="CORE.html#perlmod">perlmod</a></li>
          <li><a href="CORE.html#perlobj">perlobj</a></li>
          <li><a href="CORE.html#perlop">perlop</a></li>
          <li><a href="CORE.html#perlsub">perlsub</a></li>
          <li><a href="CORE.html#perlsyn">perlsyn</a></li>
        </ul>
      </li>
    </ul>
  </li>
</ul></nav>
<div class="pod anchors">
<h1 id="NAME">NAME </h1>

<p>perlfunc - Perl builtin functions</p>

<h1 id="DESCRIPTION">DESCRIPTION</h1>

<p>The functions in this section can serve as terms in an expression. They fall into two major categories: list operators and named unary operators. These differ in their precedence relationship with a following comma. (See the precedence table in <a href="https://metacpan.org/pod/distribution/perl/pod/perlop.pod">perlop</a>.) List operators take more than one argument, while unary operators can never take more than one argument. Thus, a comma terminates the argument of a unary operator, but merely separates the arguments of a list operator. A unary operator generally provides scalar context to its argument, while a list operator may provide either scalar or list contexts for its arguments. If it does both, scalar arguments come first and list argument follow, and there can only ever be one such list argument. For instance, <a href="CORE.html#splice-ARRAY,OFFSET,LENGTH,LIST"><code>splice</code></a> has three scalar arguments followed by a list, whereas <a href="CORE.html#gethostbyname-NAME"><code>gethostbyname</code></a> has four scalar arguments.</p>

<p>In the syntax descriptions that follow, list operators that expect a list (and provide list context for elements of the list) are shown with LIST as an argument. Such a list may consist of any combination of scalar arguments or list values; the list values will be included in the list as if each individual element were interpolated at that point in the list, forming a longer single-dimensional list value. Commas should separate literal elements of the LIST.</p>

<p>Any function in the list below may be used either with or without parentheses around its arguments. (The syntax descriptions omit the parentheses.) If you use parentheses, the simple but occasionally surprising rule is this: It <i>looks</i> like a function, therefore it <i>is</i> a function, and precedence doesn&#39;t matter. Otherwise it&#39;s a list operator or unary operator, and precedence does matter. Whitespace between the function and left parenthesis doesn&#39;t count, so sometimes you need to be careful:</p>

<pre><code>    print 1+2+4;      # Prints 7.
    print(1+2) + 4;   # Prints 3.
    print (1+2)+4;    # Also prints 3!
    print +(1+2)+4;   # Prints 7.
    print ((1+2)+4);  # Prints 7.</code></pre>

<p>If you run Perl with the <a href="https://metacpan.org/pod/warnings"><code>use warnings</code></a> pragma, it can warn you about this. For example, the third line above produces:</p>

<pre><code>    print (...) interpreted as function at - line 1.
    Useless use of integer addition in void context at - line 1.</code></pre>

<p>A few functions take no arguments at all, and therefore work as neither unary nor list operators. These include such functions as <a href="CORE.html#time"><code>time</code></a> and <a href="CORE.html#endpwent"><code>endpwent</code></a>. For example, <code>time+86_400</code> always means <code>time() + 86_400</code>.</p>

<p>For functions that can be used in either a scalar or list context, nonabortive failure is generally indicated in scalar context by returning the undefined value, and in list context by returning the empty list.</p>

<p>Remember the following important rule: There is <b>no rule</b> that relates the behavior of an expression in list context to its behavior in scalar context, or vice versa. It might do two totally different things. Each operator and function decides which sort of value would be most appropriate to return in scalar context. Some operators return the length of the list that would have been returned in list context. Some operators return the first value in the list. Some operators return the last value in the list. Some operators return a count of successful operations. In general, they do what you want, unless you want consistency. </p>

<p>A named array in scalar context is quite different from what would at first glance appear to be a list in scalar context. You can&#39;t get a list like <code>(1,2,3)</code> into being in scalar context, because the compiler knows the context at compile time. It would generate the scalar comma operator there, not the list concatenation version of the comma. That means it was never a list to start with.</p>

<p>In general, functions in Perl that serve as wrappers for system calls (&quot;syscalls&quot;) of the same name (like <a href="http://man.he.net/man2/chown">chown(2)</a>, <a href="http://man.he.net/man2/fork">fork(2)</a>, <a href="http://man.he.net/man2/closedir">closedir(2)</a>, etc.) return true when they succeed and <a href="CORE.html#undef-EXPR"><code>undef</code></a> otherwise, as is usually mentioned in the descriptions below. This is different from the C interfaces, which return <code>-1</code> on failure. Exceptions to this rule include <a href="CORE.html#wait"><code>wait</code></a>, <a href="CORE.html#waitpid-PID,FLAGS"><code>waitpid</code></a>, and <a href="CORE.html#syscall-NUMBER,-LIST"><code>syscall</code></a>. System calls also set the special <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$!"><code>$!</code></a> variable on failure. Other functions do not, except accidentally.</p>

<p>Extension modules can also hook into the Perl parser to define new kinds of keyword-headed expression. These may look like functions, but may also look completely different. The syntax following the keyword is defined entirely by the extension. If you are an implementor, see <a href="https://metacpan.org/pod/perlapi#PL_keyword_plugin">&quot;PL_keyword_plugin&quot; in perlapi</a> for the mechanism. If you are using such a module, see the module&#39;s documentation for details of the syntax that it defines.</p>

<h2 id="Perl-Functions-by-Category"><a id="Perl"></a>Perl Functions by Category </h2>

<p>Here are Perl&#39;s functions (including things that look like functions, like some keywords and named operators) arranged by category. Some functions appear in more than one place. Any warnings, including those produced by keywords, are described in <a href="https://metacpan.org/pod/distribution/perl/pod/perldiag.pod">perldiag</a> and <a href="https://metacpan.org/pod/warnings">warnings</a>.</p>

<dl>

<dt id="Functions-for-SCALARs-or-strings"><a id="Functions"></a>Functions for SCALARs or strings   </dt>
<dd>

<p><a href="CORE.html#chomp-VARIABLE"><code>chomp</code></a>, <a href="CORE.html#chop-VARIABLE"><code>chop</code></a>, <a href="CORE.html#chr-NUMBER"><code>chr</code></a>, <a href="CORE.html#crypt-PLAINTEXT,SALT"><code>crypt</code></a>, <a href="CORE.html#fc-EXPR"><code>fc</code></a>, <a href="CORE.html#hex-EXPR"><code>hex</code></a>, <a href="CORE.html#index-STR,SUBSTR,POSITION"><code>index</code></a>, <a href="CORE.html#lc-EXPR"><code>lc</code></a>, <a href="CORE.html#lcfirst-EXPR"><code>lcfirst</code></a>, <a href="CORE.html#length-EXPR"><code>length</code></a>, <a href="CORE.html#oct-EXPR"><code>oct</code></a>, <a href="CORE.html#ord-EXPR"><code>ord</code></a>, <a href="CORE.html#pack-TEMPLATE,LIST"><code>pack</code></a>, <a href="CORE.html#q/STRING/"><code>q//</code></a>, <a href="CORE.html#qq/STRING/"><code>qq//</code></a>, <a href="CORE.html#reverse-LIST"><code>reverse</code></a>, <a href="CORE.html#rindex-STR,SUBSTR,POSITION"><code>rindex</code></a>, <a href="CORE.html#sprintf-FORMAT,-LIST"><code>sprintf</code></a>, <a href="CORE.html#substr-EXPR,OFFSET,LENGTH,REPLACEMENT"><code>substr</code></a>, <a href="CORE.html#tr///"><code>tr///</code></a>, <a href="CORE.html#uc-EXPR"><code>uc</code></a>, <a href="CORE.html#ucfirst-EXPR"><code>ucfirst</code></a>, <a href="CORE.html#y///"><code>y///</code></a></p>

<p><a href="CORE.html#fc-EXPR"><code>fc</code></a> is available only if the <a href="https://metacpan.org/pod/feature#The-&#39;fc&#39;-feature"><code>&quot;fc&quot;</code> feature</a> is enabled or if it is prefixed with <code>CORE::</code>. The <a href="https://metacpan.org/pod/feature#The-&#39;fc&#39;-feature"><code>&quot;fc&quot;</code> feature</a> is enabled automatically with a <code>use v5.16</code> (or higher) declaration in the current scope.</p>

</dd>
<dt id="Regular-expressions-and-pattern-matching"><a id="Regular"></a>Regular expressions and pattern matching   </dt>
<dd>

<p><a href="CORE.html#m//"><code>m//</code></a>, <a href="CORE.html#pos-SCALAR"><code>pos</code></a>, <a href="CORE.html#qr/STRING/"><code>qr//</code></a>, <a href="CORE.html#quotemeta-EXPR"><code>quotemeta</code></a>, <a href="CORE.html#s///"><code>s///</code></a>, <a href="CORE.html#split-/PATTERN/,EXPR,LIMIT"><code>split</code></a>, <a href="CORE.html#study-SCALAR"><code>study</code></a></p>

</dd>
<dt id="Numeric-functions"><a id="Numeric"></a>Numeric functions    </dt>
<dd>

<p><a href="CORE.html#abs-VALUE"><code>abs</code></a>, <a href="CORE.html#atan2-Y,X"><code>atan2</code></a>, <a href="CORE.html#cos-EXPR"><code>cos</code></a>, <a href="CORE.html#exp-EXPR"><code>exp</code></a>, <a href="CORE.html#hex-EXPR"><code>hex</code></a>, <a href="CORE.html#int-EXPR"><code>int</code></a>, <a href="CORE.html#log-EXPR"><code>log</code></a>, <a href="CORE.html#oct-EXPR"><code>oct</code></a>, <a href="CORE.html#rand-EXPR"><code>rand</code></a>, <a href="CORE.html#sin-EXPR"><code>sin</code></a>, <a href="CORE.html#sqrt-EXPR"><code>sqrt</code></a>, <a href="CORE.html#srand-EXPR"><code>srand</code></a></p>

</dd>
<dt id="Functions-for-real-@ARRAYs"><a id="Functions1"></a><a id="Functions-for-real--ARRAYs"></a>Functions for real @ARRAYs </dt>
<dd>

<p><a href="CORE.html#each-HASH"><code>each</code></a>, <a href="CORE.html#keys-HASH"><code>keys</code></a>, <a href="CORE.html#pop-ARRAY"><code>pop</code></a>, <a href="CORE.html#push-ARRAY,LIST"><code>push</code></a>, <a href="CORE.html#shift-ARRAY"><code>shift</code></a>, <a href="CORE.html#splice-ARRAY,OFFSET,LENGTH,LIST"><code>splice</code></a>, <a href="CORE.html#unshift-ARRAY,LIST"><code>unshift</code></a>, <a href="CORE.html#values-HASH"><code>values</code></a></p>

</dd>
<dt id="Functions-for-list-data"><a id="Functions2"></a>Functions for list data </dt>
<dd>

<p><a href="CORE.html#grep-BLOCK-LIST"><code>grep</code></a>, <a href="CORE.html#join-EXPR,LIST"><code>join</code></a>, <a href="CORE.html#map-BLOCK-LIST"><code>map</code></a>, <a href="CORE.html#qw/STRING/"><code>qw//</code></a>, <a href="CORE.html#reverse-LIST"><code>reverse</code></a>, <a href="CORE.html#sort-SUBNAME-LIST"><code>sort</code></a>, <a href="CORE.html#unpack-TEMPLATE,EXPR"><code>unpack</code></a></p>

</dd>
<dt id="Functions-for-real-%HASHes"><a id="Functions3"></a><a id="Functions-for-real--HASHes"></a>Functions for real %HASHes </dt>
<dd>

<p><a href="CORE.html#delete-EXPR"><code>delete</code></a>, <a href="CORE.html#each-HASH"><code>each</code></a>, <a href="CORE.html#exists-EXPR"><code>exists</code></a>, <a href="CORE.html#keys-HASH"><code>keys</code></a>, <a href="CORE.html#values-HASH"><code>values</code></a></p>

</dd>
<dt id="Input-and-output-functions"><a id="Input"></a>Input and output functions    </dt>
<dd>

<p><a href="CORE.html#binmode-FILEHANDLE,-LAYER"><code>binmode</code></a>, <a href="CORE.html#close-FILEHANDLE"><code>close</code></a>, <a href="CORE.html#closedir-DIRHANDLE"><code>closedir</code></a>, <a href="CORE.html#dbmclose-HASH"><code>dbmclose</code></a>, <a href="CORE.html#dbmopen-HASH,DBNAME,MASK"><code>dbmopen</code></a>, <a href="CORE.html#die-LIST"><code>die</code></a>, <a href="CORE.html#eof-FILEHANDLE"><code>eof</code></a>, <a href="CORE.html#fileno-FILEHANDLE"><code>fileno</code></a>, <a href="CORE.html#flock-FILEHANDLE,OPERATION"><code>flock</code></a>, <a href="CORE.html#format"><code>format</code></a>, <a href="CORE.html#getc-FILEHANDLE"><code>getc</code></a>, <a href="CORE.html#print-FILEHANDLE-LIST"><code>print</code></a>, <a href="CORE.html#printf-FILEHANDLE-FORMAT,-LIST"><code>printf</code></a>, <a href="CORE.html#read-FILEHANDLE,SCALAR,LENGTH,OFFSET"><code>read</code></a>, <a href="CORE.html#readdir-DIRHANDLE"><code>readdir</code></a>, <a href="CORE.html#readline-EXPR"><code>readline</code></a>, <a href="CORE.html#rewinddir-DIRHANDLE"><code>rewinddir</code></a>, <a href="CORE.html#say-FILEHANDLE-LIST"><code>say</code></a>, <a href="CORE.html#seek-FILEHANDLE,POSITION,WHENCE"><code>seek</code></a>, <a href="CORE.html#seekdir-DIRHANDLE,POS"><code>seekdir</code></a>, <a href="CORE.html#select-RBITS,WBITS,EBITS,TIMEOUT"><code>select</code></a>, <a href="CORE.html#syscall-NUMBER,-LIST"><code>syscall</code></a>, <a href="CORE.html#sysread-FILEHANDLE,SCALAR,LENGTH,OFFSET"><code>sysread</code></a>, <a href="CORE.html#sysseek-FILEHANDLE,POSITION,WHENCE"><code>sysseek</code></a>, <a href="CORE.html#syswrite-FILEHANDLE,SCALAR,LENGTH,OFFSET"><code>syswrite</code></a>, <a href="CORE.html#tell-FILEHANDLE"><code>tell</code></a>, <a href="CORE.html#telldir-DIRHANDLE"><code>telldir</code></a>, <a href="CORE.html#truncate-FILEHANDLE,LENGTH"><code>truncate</code></a>, <a href="CORE.html#warn-LIST"><code>warn</code></a>, <a href="CORE.html#write-FILEHANDLE"><code>write</code></a></p>

<p><a href="CORE.html#say-FILEHANDLE-LIST"><code>say</code></a> is available only if the <a href="https://metacpan.org/pod/feature#The-&#39;say&#39;-feature"><code>&quot;say&quot;</code> feature</a> is enabled or if it is prefixed with <code>CORE::</code>. The <a href="https://metacpan.org/pod/feature#The-&#39;say&#39;-feature"><code>&quot;say&quot;</code> feature</a> is enabled automatically with a <code>use v5.10</code> (or higher) declaration in the current scope.</p>

</dd>
<dt id="Functions-for-fixed-length-data-or-records"><a id="Functions4"></a>Functions for fixed-length data or records</dt>
<dd>

<p><a href="CORE.html#pack-TEMPLATE,LIST"><code>pack</code></a>, <a href="CORE.html#read-FILEHANDLE,SCALAR,LENGTH,OFFSET"><code>read</code></a>, <a href="CORE.html#syscall-NUMBER,-LIST"><code>syscall</code></a>, <a href="CORE.html#sysread-FILEHANDLE,SCALAR,LENGTH,OFFSET"><code>sysread</code></a>, <a href="CORE.html#sysseek-FILEHANDLE,POSITION,WHENCE"><code>sysseek</code></a>, <a href="CORE.html#syswrite-FILEHANDLE,SCALAR,LENGTH,OFFSET"><code>syswrite</code></a>, <a href="CORE.html#unpack-TEMPLATE,EXPR"><code>unpack</code></a>, <a href="CORE.html#vec-EXPR,OFFSET,BITS"><code>vec</code></a></p>

</dd>
<dt id="Functions-for-filehandles,-files,-or-directories"><a id="Functions5"></a><a id="Functions-for-filehandles--files--or-directories"></a>Functions for filehandles, files, or directories      </dt>
<dd>

<p><a href="CORE.html#-X-FILEHANDLE"><code>-<i>X</i></code></a>, <a href="CORE.html#chdir-EXPR"><code>chdir</code></a>, <a href="CORE.html#chmod-LIST"><code>chmod</code></a>, <a href="CORE.html#chown-LIST"><code>chown</code></a>, <a href="CORE.html#chroot-FILENAME"><code>chroot</code></a>, <a href="CORE.html#fcntl-FILEHANDLE,FUNCTION,SCALAR"><code>fcntl</code></a>, <a href="CORE.html#glob-EXPR"><code>glob</code></a>, <a href="CORE.html#ioctl-FILEHANDLE,FUNCTION,SCALAR"><code>ioctl</code></a>, <a href="CORE.html#link-OLDFILE,NEWFILE"><code>link</code></a>, <a href="CORE.html#lstat-FILEHANDLE"><code>lstat</code></a>, <a href="CORE.html#mkdir-FILENAME,MODE"><code>mkdir</code></a>, <a href="CORE.html#open-FILEHANDLE,MODE,EXPR"><code>open</code></a>, <a href="CORE.html#opendir-DIRHANDLE,EXPR"><code>opendir</code></a>, <a href="CORE.html#readlink-EXPR"><code>readlink</code></a>, <a href="CORE.html#rename-OLDNAME,NEWNAME"><code>rename</code></a>, <a href="CORE.html#rmdir-FILENAME"><code>rmdir</code></a>, <a href="CORE.html#select-FILEHANDLE"><code>select</code></a>, <a href="CORE.html#stat-FILEHANDLE"><code>stat</code></a>, <a href="CORE.html#symlink-OLDFILE,NEWFILE"><code>symlink</code></a>, <a href="CORE.html#sysopen-FILEHANDLE,FILENAME,MODE"><code>sysopen</code></a>, <a href="CORE.html#umask-EXPR"><code>umask</code></a>, <a href="CORE.html#unlink-LIST"><code>unlink</code></a>, <a href="CORE.html#utime-LIST"><code>utime</code></a></p>

</dd>
<dt id="Keywords-related-to-the-control-flow-of-your-Perl-program"><a id="Keywords"></a>Keywords related to the control flow of your Perl program </dt>
<dd>

<p><a href="CORE.html#break"><code>break</code></a>, <a href="CORE.html#caller-EXPR"><code>caller</code></a>, <a href="CORE.html#continue-BLOCK"><code>continue</code></a>, <a href="CORE.html#die-LIST"><code>die</code></a>, <a href="CORE.html#do-BLOCK"><code>do</code></a>, <a href="CORE.html#dump-LABEL"><code>dump</code></a>, <a href="CORE.html#eval-EXPR"><code>eval</code></a>, <a href="CORE.html#evalbytes-EXPR"><code>evalbytes</code></a>, <a href="CORE.html#exit-EXPR"><code>exit</code></a>, <a href="CORE.html#__FILE__"><code>__FILE__</code></a>, <a href="CORE.html#goto-LABEL"><code>goto</code></a>, <a href="CORE.html#last-LABEL"><code>last</code></a>, <a href="CORE.html#__LINE__"><code>__LINE__</code></a>, <a href="CORE.html#method-NAME-BLOCK"><code>method</code></a>, <a href="CORE.html#next-LABEL"><code>next</code></a>, <a href="CORE.html#__PACKAGE__"><code>__PACKAGE__</code></a>, <a href="CORE.html#redo-LABEL"><code>redo</code></a>, <a href="CORE.html#return-EXPR"><code>return</code></a>, <a href="CORE.html#sub-NAME-BLOCK"><code>sub</code></a>, <a href="CORE.html#__SUB__"><code>__SUB__</code></a>, <a href="CORE.html#wantarray"><code>wantarray</code></a></p>

<p><a href="CORE.html#break"><code>break</code></a> is available only if you enable the experimental <a href="https://metacpan.org/pod/feature#The-&#39;switch&#39;-feature"><code>&quot;switch&quot;</code> feature</a> or use the <code>CORE::</code> prefix. The <a href="https://metacpan.org/pod/feature#The-&#39;switch&#39;-feature"><code>&quot;switch&quot;</code> feature</a> also enables the <code>default</code>, <code>given</code> and <code>when</code> statements, which are documented in <a href="https://metacpan.org/pod/distribution/perl/pod/perlsyn.pod#Switch-Statements">&quot;Switch Statements&quot; in perlsyn</a>. The <a href="https://metacpan.org/pod/feature#The-&#39;switch&#39;-feature"><code>&quot;switch&quot;</code> feature</a> is enabled automatically with a <code>use v5.10</code> (or higher) declaration in the current scope. In Perl v5.14 and earlier, <a href="CORE.html#continue-BLOCK"><code>continue</code></a> required the <a href="https://metacpan.org/pod/feature#The-&#39;switch&#39;-feature"><code>&quot;switch&quot;</code> feature</a>, like the other keywords.</p>

<p><a href="CORE.html#evalbytes-EXPR"><code>evalbytes</code></a> is only available with the <a href="https://metacpan.org/pod/feature#The-&#39;unicode_eval&#39;-and-&#39;evalbytes&#39;-features"><code>&quot;evalbytes&quot;</code> feature</a> (see <a href="https://metacpan.org/pod/feature">feature</a>) or if prefixed with <code>CORE::</code>. <a href="CORE.html#__SUB__"><code>__SUB__</code></a> is only available with the <a href="https://metacpan.org/pod/feature#The-&#39;current_sub&#39;-feature"><code>&quot;current_sub&quot;</code> feature</a> or if prefixed with <code>CORE::</code>. Both the <a href="https://metacpan.org/pod/feature#The-&#39;unicode_eval&#39;-and-&#39;evalbytes&#39;-features"><code>&quot;evalbytes&quot;</code></a> and <a href="https://metacpan.org/pod/feature#The-&#39;current_sub&#39;-feature"><code>&quot;current_sub&quot;</code></a> features are enabled automatically with a <code>use v5.16</code> (or higher) declaration in the current scope.</p>

</dd>
<dt id="Keywords-related-to-scoping"><a id="Keywords1"></a>Keywords related to scoping</dt>
<dd>

<p><a href="CORE.html#caller-EXPR"><code>caller</code></a>, <a href="CORE.html#class-NAMESPACE"><code>class</code></a>, <a href="CORE.html#field-VARNAME"><code>field</code></a>, <a href="CORE.html#import-LIST"><code>import</code></a>, <a href="CORE.html#local-EXPR"><code>local</code></a>, <a href="CORE.html#my-VARLIST"><code>my</code></a>, <a href="CORE.html#our-VARLIST"><code>our</code></a>, <a href="CORE.html#package-NAMESPACE"><code>package</code></a>, <a href="CORE.html#state-VARLIST"><code>state</code></a>, <a href="CORE.html#use-Module-VERSION-LIST"><code>use</code></a></p>

<p><a href="CORE.html#state-VARLIST"><code>state</code></a> is available only if the <a href="https://metacpan.org/pod/feature#The-&#39;state&#39;-feature"><code>&quot;state&quot;</code> feature</a> is enabled or if it is prefixed with <code>CORE::</code>. The <a href="https://metacpan.org/pod/feature#The-&#39;state&#39;-feature"><code>&quot;state&quot;</code> feature</a> is enabled automatically with a <code>use v5.10</code> (or higher) declaration in the current scope.</p>

</dd>
<dt id="Miscellaneous-functions"><a id="Miscellaneous"></a>Miscellaneous functions</dt>
<dd>

<p><a href="CORE.html#defined-EXPR"><code>defined</code></a>, <a href="CORE.html#formline-PICTURE,LIST"><code>formline</code></a>, <a href="CORE.html#lock-THING"><code>lock</code></a>, <a href="CORE.html#prototype-FUNCTION"><code>prototype</code></a>, <a href="CORE.html#reset-EXPR"><code>reset</code></a>, <a href="CORE.html#scalar-EXPR"><code>scalar</code></a>, <a href="CORE.html#undef-EXPR"><code>undef</code></a></p>

</dd>
<dt id="Functions-for-processes-and-process-groups"><a id="Functions6"></a>Functions for processes and process groups   </dt>
<dd>

<p><a href="CORE.html#alarm-SECONDS"><code>alarm</code></a>, <a href="CORE.html#exec-LIST"><code>exec</code></a>, <a href="CORE.html#fork"><code>fork</code></a>, <a href="CORE.html#getpgrp-PID"><code>getpgrp</code></a>, <a href="CORE.html#getppid"><code>getppid</code></a>, <a href="CORE.html#getpriority-WHICH,WHO"><code>getpriority</code></a>, <a href="CORE.html#kill-SIGNAL,-LIST"><code>kill</code></a>, <a href="CORE.html#pipe-READHANDLE,WRITEHANDLE"><code>pipe</code></a>, <a href="CORE.html#qx/STRING/"><code>qx//</code></a>, <a href="CORE.html#readpipe-EXPR"><code>readpipe</code></a>, <a href="CORE.html#setpgrp-PID,PGRP"><code>setpgrp</code></a>, <a href="CORE.html#setpriority-WHICH,WHO,PRIORITY"><code>setpriority</code></a>, <a href="CORE.html#sleep-EXPR"><code>sleep</code></a>, <a href="CORE.html#system-LIST"><code>system</code></a>, <a href="CORE.html#times"><code>times</code></a>, <a href="CORE.html#wait"><code>wait</code></a>, <a href="CORE.html#waitpid-PID,FLAGS"><code>waitpid</code></a></p>

</dd>
<dt id="Keywords-related-to-Perl-modules"><a id="Keywords2"></a>Keywords related to Perl modules </dt>
<dd>

<p><a href="CORE.html#do-EXPR"><code>do</code></a>, <a href="CORE.html#import-LIST"><code>import</code></a>, <a href="CORE.html#no-MODULE-VERSION-LIST"><code>no</code></a>, <a href="CORE.html#package-NAMESPACE"><code>package</code></a>, <a href="CORE.html#require-VERSION"><code>require</code></a>, <a href="CORE.html#use-Module-VERSION-LIST"><code>use</code></a></p>

</dd>
<dt id="Keywords-related-to-classes-and-object-orientation"><a id="Keywords3"></a>Keywords related to classes and object-orientation   </dt>
<dd>

<p><a href="CORE.html#bless-REF,CLASSNAME"><code>bless</code></a>, <a href="CORE.html#class-NAMESPACE"><code>class</code></a>, <a href="CORE.html#dbmclose-HASH"><code>dbmclose</code></a>, <a href="CORE.html#dbmopen-HASH,DBNAME,MASK"><code>dbmopen</code></a>, <a href="CORE.html#field-VARNAME"><code>field</code></a>, <a href="CORE.html#method-NAME-BLOCK"><code>method</code></a>, <a href="CORE.html#package-NAMESPACE"><code>package</code></a>, <a href="CORE.html#ref-EXPR"><code>ref</code></a>, <a href="CORE.html#tie-VARIABLE,CLASSNAME,LIST"><code>tie</code></a>, <a href="CORE.html#tied-VARIABLE"><code>tied</code></a>, <a href="CORE.html#untie-VARIABLE"><code>untie</code></a>, <a href="CORE.html#use-Module-VERSION-LIST"><code>use</code></a></p>

</dd>
<dt id="Low-level-socket-functions"><a id="Low"></a>Low-level socket functions  </dt>
<dd>

<p><a href="CORE.html#accept-NEWSOCKET,GENERICSOCKET"><code>accept</code></a>, <a href="CORE.html#bind-SOCKET,NAME"><code>bind</code></a>, <a href="CORE.html#connect-SOCKET,NAME"><code>connect</code></a>, <a href="CORE.html#getpeername-SOCKET"><code>getpeername</code></a>, <a href="CORE.html#getsockname-SOCKET"><code>getsockname</code></a>, <a href="CORE.html#getsockopt-SOCKET,LEVEL,OPTNAME"><code>getsockopt</code></a>, <a href="CORE.html#listen-SOCKET,QUEUESIZE"><code>listen</code></a>, <a href="CORE.html#recv-SOCKET,SCALAR,LENGTH,FLAGS"><code>recv</code></a>, <a href="CORE.html#send-SOCKET,MSG,FLAGS,TO"><code>send</code></a>, <a href="CORE.html#setsockopt-SOCKET,LEVEL,OPTNAME,OPTVAL"><code>setsockopt</code></a>, <a href="CORE.html#shutdown-SOCKET,HOW"><code>shutdown</code></a>, <a href="CORE.html#socket-SOCKET,DOMAIN,TYPE,PROTOCOL"><code>socket</code></a>, <a href="CORE.html#socketpair-SOCKET1,SOCKET2,DOMAIN,TYPE,PROTOCOL"><code>socketpair</code></a></p>

</dd>
<dt id="System-V-interprocess-communication-functions"><a id="System"></a>System V interprocess communication functions      </dt>
<dd>

<p><a href="CORE.html#msgctl-ID,CMD,ARG"><code>msgctl</code></a>, <a href="CORE.html#msgget-KEY,FLAGS"><code>msgget</code></a>, <a href="CORE.html#msgrcv-ID,VAR,SIZE,TYPE,FLAGS"><code>msgrcv</code></a>, <a href="CORE.html#msgsnd-ID,MSG,FLAGS"><code>msgsnd</code></a>, <a href="CORE.html#semctl-ID,SEMNUM,CMD,ARG"><code>semctl</code></a>, <a href="CORE.html#semget-KEY,NSEMS,FLAGS"><code>semget</code></a>, <a href="CORE.html#semop-KEY,OPSTRING"><code>semop</code></a>, <a href="CORE.html#shmctl-ID,CMD,ARG"><code>shmctl</code></a>, <a href="CORE.html#shmget-KEY,SIZE,FLAGS"><code>shmget</code></a>, <a href="CORE.html#shmread-ID,VAR,POS,SIZE"><code>shmread</code></a>, <a href="CORE.html#shmwrite-ID,STRING,POS,SIZE"><code>shmwrite</code></a></p>

</dd>
<dt id="Fetching-user-and-group-info"><a id="Fetching"></a>Fetching user and group info       </dt>
<dd>

<p><a href="CORE.html#endgrent"><code>endgrent</code></a>, <a href="CORE.html#endhostent"><code>endhostent</code></a>, <a href="CORE.html#endnetent"><code>endnetent</code></a>, <a href="CORE.html#endpwent"><code>endpwent</code></a>, <a href="CORE.html#getgrent"><code>getgrent</code></a>, <a href="CORE.html#getgrgid-GID"><code>getgrgid</code></a>, <a href="CORE.html#getgrnam-NAME"><code>getgrnam</code></a>, <a href="CORE.html#getlogin"><code>getlogin</code></a>, <a href="CORE.html#getpwent"><code>getpwent</code></a>, <a href="CORE.html#getpwnam-NAME"><code>getpwnam</code></a>, <a href="CORE.html#getpwuid-UID"><code>getpwuid</code></a>, <a href="CORE.html#setgrent"><code>setgrent</code></a>, <a href="CORE.html#setpwent"><code>setpwent</code></a></p>

</dd>
<dt id="Fetching-network-info"><a id="Fetching1"></a>Fetching network info       </dt>
<dd>

<p><a href="CORE.html#endprotoent"><code>endprotoent</code></a>, <a href="CORE.html#endservent"><code>endservent</code></a>, <a href="CORE.html#gethostbyaddr-ADDR,ADDRTYPE"><code>gethostbyaddr</code></a>, <a href="CORE.html#gethostbyname-NAME"><code>gethostbyname</code></a>, <a href="CORE.html#gethostent"><code>gethostent</code></a>, <a href="CORE.html#getnetbyaddr-ADDR,ADDRTYPE"><code>getnetbyaddr</code></a>, <a href="CORE.html#getnetbyname-NAME"><code>getnetbyname</code></a>, <a href="CORE.html#getnetent"><code>getnetent</code></a>, <a href="CORE.html#getprotobyname-NAME"><code>getprotobyname</code></a>, <a href="CORE.html#getprotobynumber-NUMBER"><code>getprotobynumber</code></a>, <a href="CORE.html#getprotoent"><code>getprotoent</code></a>, <a href="CORE.html#getservbyname-NAME,PROTO"><code>getservbyname</code></a>, <a href="CORE.html#getservbyport-PORT,PROTO"><code>getservbyport</code></a>, <a href="CORE.html#getservent"><code>getservent</code></a>, <a href="CORE.html#sethostent-STAYOPEN"><code>sethostent</code></a>, <a href="CORE.html#setnetent-STAYOPEN"><code>setnetent</code></a>, <a href="CORE.html#setprotoent-STAYOPEN"><code>setprotoent</code></a>, <a href="CORE.html#setservent-STAYOPEN"><code>setservent</code></a></p>

</dd>
<dt id="Time-related-functions"><a id="Time"></a>Time-related functions  </dt>
<dd>

<p><a href="CORE.html#gmtime-EXPR"><code>gmtime</code></a>, <a href="CORE.html#localtime-EXPR"><code>localtime</code></a>, <a href="CORE.html#time"><code>time</code></a>, <a href="CORE.html#times"><code>times</code></a></p>

</dd>
<dt id="Non-function-keywords"><a id="Non"></a>Non-function keywords</dt>
<dd>

<p><code>ADJUST</code>, <code>and</code>, <code>AUTOLOAD</code>, <code>BEGIN</code>, <code>catch</code>, <code>CHECK</code>, <code>cmp</code>, <code>CORE</code>, <code>__DATA__</code>, <code>default</code>, <code>defer</code>, <code>DESTROY</code>, <code>else</code>, <code>elseif</code>, <code>elsif</code>, <code>END</code>, <code>__END__</code>, <code>eq</code>, <code>finally</code>, <code>for</code>, <code>foreach</code>, <code>ge</code>, <code>given</code>, <code>gt</code>, <code>if</code>, <code>INIT</code>, <code>isa</code>, <code>le</code>, <code>lt</code>, <code>ne</code>, <code>not</code>, <code>or</code>, <code>try</code>, <code>UNITCHECK</code>, <code>unless</code>, <code>until</code>, <code>when</code>, <code>while</code>, <code>x</code>, <code>xor</code></p>

</dd>
</dl>

<h2 id="Portability">Portability   </h2>

<p>Perl was born in Unix and can therefore access all common Unix system calls. In non-Unix environments, the functionality of some Unix system calls may not be available or details of the available functionality may differ slightly. The Perl functions affected by this are:</p>

<p><a href="CORE.html#-X-FILEHANDLE"><code>-<i>X</i></code></a>, <a href="CORE.html#binmode-FILEHANDLE,-LAYER"><code>binmode</code></a>, <a href="CORE.html#chmod-LIST"><code>chmod</code></a>, <a href="CORE.html#chown-LIST"><code>chown</code></a>, <a href="CORE.html#chroot-FILENAME"><code>chroot</code></a>, <a href="CORE.html#crypt-PLAINTEXT,SALT"><code>crypt</code></a>, <a href="CORE.html#dbmclose-HASH"><code>dbmclose</code></a>, <a href="CORE.html#dbmopen-HASH,DBNAME,MASK"><code>dbmopen</code></a>, <a href="CORE.html#dump-LABEL"><code>dump</code></a>, <a href="CORE.html#endgrent"><code>endgrent</code></a>, <a href="CORE.html#endhostent"><code>endhostent</code></a>, <a href="CORE.html#endnetent"><code>endnetent</code></a>, <a href="CORE.html#endprotoent"><code>endprotoent</code></a>, <a href="CORE.html#endpwent"><code>endpwent</code></a>, <a href="CORE.html#endservent"><code>endservent</code></a>, <a href="CORE.html#exec-LIST"><code>exec</code></a>, <a href="CORE.html#fcntl-FILEHANDLE,FUNCTION,SCALAR"><code>fcntl</code></a>, <a href="CORE.html#flock-FILEHANDLE,OPERATION"><code>flock</code></a>, <a href="CORE.html#fork"><code>fork</code></a>, <a href="CORE.html#getgrent"><code>getgrent</code></a>, <a href="CORE.html#getgrgid-GID"><code>getgrgid</code></a>, <a href="CORE.html#gethostbyname-NAME"><code>gethostbyname</code></a>, <a href="CORE.html#gethostent"><code>gethostent</code></a>, <a href="CORE.html#getlogin"><code>getlogin</code></a>, <a href="CORE.html#getnetbyaddr-ADDR,ADDRTYPE"><code>getnetbyaddr</code></a>, <a href="CORE.html#getnetbyname-NAME"><code>getnetbyname</code></a>, <a href="CORE.html#getnetent"><code>getnetent</code></a>, <a href="CORE.html#getppid"><code>getppid</code></a>, <a href="CORE.html#getpgrp-PID"><code>getpgrp</code></a>, <a href="CORE.html#getpriority-WHICH,WHO"><code>getpriority</code></a>, <a href="CORE.html#getprotobynumber-NUMBER"><code>getprotobynumber</code></a>, <a href="CORE.html#getprotoent"><code>getprotoent</code></a>, <a href="CORE.html#getpwent"><code>getpwent</code></a>, <a href="CORE.html#getpwnam-NAME"><code>getpwnam</code></a>, <a href="CORE.html#getpwuid-UID"><code>getpwuid</code></a>, <a href="CORE.html#getservbyport-PORT,PROTO"><code>getservbyport</code></a>, <a href="CORE.html#getservent"><code>getservent</code></a>, <a href="CORE.html#getsockopt-SOCKET,LEVEL,OPTNAME"><code>getsockopt</code></a>, <a href="CORE.html#glob-EXPR"><code>glob</code></a>, <a href="CORE.html#ioctl-FILEHANDLE,FUNCTION,SCALAR"><code>ioctl</code></a>, <a href="CORE.html#kill-SIGNAL,-LIST"><code>kill</code></a>, <a href="CORE.html#link-OLDFILE,NEWFILE"><code>link</code></a>, <a href="CORE.html#lstat-FILEHANDLE"><code>lstat</code></a>, <a href="CORE.html#msgctl-ID,CMD,ARG"><code>msgctl</code></a>, <a href="CORE.html#msgget-KEY,FLAGS"><code>msgget</code></a>, <a href="CORE.html#msgrcv-ID,VAR,SIZE,TYPE,FLAGS"><code>msgrcv</code></a>, <a href="CORE.html#msgsnd-ID,MSG,FLAGS"><code>msgsnd</code></a>, <a href="CORE.html#open-FILEHANDLE,MODE,EXPR"><code>open</code></a>, <a href="CORE.html#pipe-READHANDLE,WRITEHANDLE"><code>pipe</code></a>, <a href="CORE.html#readlink-EXPR"><code>readlink</code></a>, <a href="CORE.html#rename-OLDNAME,NEWNAME"><code>rename</code></a>, <a href="CORE.html#select-RBITS,WBITS,EBITS,TIMEOUT"><code>select</code></a>, <a href="CORE.html#semctl-ID,SEMNUM,CMD,ARG"><code>semctl</code></a>, <a href="CORE.html#semget-KEY,NSEMS,FLAGS"><code>semget</code></a>, <a href="CORE.html#semop-KEY,OPSTRING"><code>semop</code></a>, <a href="CORE.html#setgrent"><code>setgrent</code></a>, <a href="CORE.html#sethostent-STAYOPEN"><code>sethostent</code></a>, <a href="CORE.html#setnetent-STAYOPEN"><code>setnetent</code></a>, <a href="CORE.html#setpgrp-PID,PGRP"><code>setpgrp</code></a>, <a href="CORE.html#setpriority-WHICH,WHO,PRIORITY"><code>setpriority</code></a>, <a href="CORE.html#setprotoent-STAYOPEN"><code>setprotoent</code></a>, <a href="CORE.html#setpwent"><code>setpwent</code></a>, <a href="CORE.html#setservent-STAYOPEN"><code>setservent</code></a>, <a href="CORE.html#setsockopt-SOCKET,LEVEL,OPTNAME,OPTVAL"><code>setsockopt</code></a>, <a href="CORE.html#shmctl-ID,CMD,ARG"><code>shmctl</code></a>, <a href="CORE.html#shmget-KEY,SIZE,FLAGS"><code>shmget</code></a>, <a href="CORE.html#shmread-ID,VAR,POS,SIZE"><code>shmread</code></a>, <a href="CORE.html#shmwrite-ID,STRING,POS,SIZE"><code>shmwrite</code></a>, <a href="CORE.html#socket-SOCKET,DOMAIN,TYPE,PROTOCOL"><code>socket</code></a>, <a href="CORE.html#socketpair-SOCKET1,SOCKET2,DOMAIN,TYPE,PROTOCOL"><code>socketpair</code></a>, <a href="CORE.html#stat-FILEHANDLE"><code>stat</code></a>, <a href="CORE.html#symlink-OLDFILE,NEWFILE"><code>symlink</code></a>, <a href="CORE.html#syscall-NUMBER,-LIST"><code>syscall</code></a>, <a href="CORE.html#sysopen-FILEHANDLE,FILENAME,MODE"><code>sysopen</code></a>, <a href="CORE.html#system-LIST"><code>system</code></a>, <a href="CORE.html#times"><code>times</code></a>, <a href="CORE.html#truncate-FILEHANDLE,LENGTH"><code>truncate</code></a>, <a href="CORE.html#umask-EXPR"><code>umask</code></a>, <a href="CORE.html#unlink-LIST"><code>unlink</code></a>, <a href="CORE.html#utime-LIST"><code>utime</code></a>, <a href="CORE.html#wait"><code>wait</code></a>, <a href="CORE.html#waitpid-PID,FLAGS"><code>waitpid</code></a></p>

<p>For more information about the portability of these functions, see <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod">perlport</a> and other available platform-specific documentation.</p>

<h2 id="Alphabetical-Listing-of-Perl-Functions"><a id="Alphabetical"></a>Alphabetical Listing of Perl Functions</h2>

<dl>

<dt id="-X-FILEHANDLE"><a id="X-FILEHANDLE"></a>-X FILEHANDLE  </dt>
<dd>

</dd>
<dt id="-X-EXPR"><a id="X-EXPR"></a>-X EXPR</dt>
<dd>

</dd>
<dt id="-X-DIRHANDLE"><a id="X-DIRHANDLE"></a>-X DIRHANDLE</dt>
<dd>

</dd>
<dt id="-X"><a id="X"></a>-X</dt>
<dd>

<p>A file test, where X is one of the letters listed below. This unary operator takes one argument, either a filename, a filehandle, or a dirhandle, and tests the associated file to see if something is true about it. If the argument is omitted, tests <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a>, except for <code>-t</code>, which tests STDIN. Unless otherwise documented, it returns <code>1</code> for true and <code>&#39;&#39;</code> for false. If the file doesn&#39;t exist or can&#39;t be examined, it returns <a href="CORE.html#undef-EXPR"><code>undef</code></a> and sets <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$!"><code>$!</code></a> (errno). With the exception of the <code>-l</code> test they all follow symbolic links because they use <code>stat()</code> and not <code>lstat()</code> (so dangling symlinks can&#39;t be examined and will therefore report failure).</p>

<p>Despite the funny names, precedence is the same as any other named unary operator. The operator may be any of:</p>

<pre><code>    -r  File is readable by effective uid/gid.
    -w  File is writable by effective uid/gid.
    -x  File is executable by effective uid/gid.
    -o  File is owned by effective uid.

    -R  File is readable by real uid/gid.
    -W  File is writable by real uid/gid.
    -X  File is executable by real uid/gid.
    -O  File is owned by real uid.

    -e  File exists.
    -z  File has zero size (is empty).
    -s  File has nonzero size (returns size in bytes).

    -f  File is a plain file.
    -d  File is a directory.
    -l  File is a symbolic link (false if symlinks aren&#39;t
        supported by the file system).
    -p  File is a named pipe (FIFO), or Filehandle is a pipe.
    -S  File is a socket.
    -b  File is a block special file.
    -c  File is a character special file.
    -t  Filehandle is opened to a tty.

    -u  File has setuid bit set.
    -g  File has setgid bit set.
    -k  File has sticky bit set.

    -T  File is an ASCII or UTF-8 text file (heuristic guess).
    -B  File is a &quot;binary&quot; file (opposite of -T).

    -M  Script start time minus file modification time, in days.
    -A  Same for access time.
    -C  Same for inode change time (Unix, may differ for other
        platforms)</code></pre>

<p>Example:</p>

<pre><code>    while (&lt;&gt;) {
        chomp;
        next unless -f $_;  # ignore specials
        #...
    }</code></pre>

<p>Note that <code>-s/a/b/</code> does not do a negated substitution. Saying <code>-exp($foo)</code> still works as expected, however: only single letters following a minus are interpreted as file tests.</p>

<p>These operators are exempt from the &quot;looks like a function rule&quot; described above. That is, an opening parenthesis after the operator does not affect how much of the following code constitutes the argument. Put the opening parentheses before the operator to separate it from code that follows (this applies only to operators with higher precedence than unary operators, of course):</p>

<pre><code>    -s($file) + 1024   # probably wrong; same as -s($file + 1024)
    (-s $file) + 1024  # correct</code></pre>

<p>The interpretation of the file permission operators <code>-r</code>, <code>-R</code>, <code>-w</code>, <code>-W</code>, <code>-x</code>, and <code>-X</code> is by default based solely on the mode of the file and the uids and gids of the user. There may be other reasons you can&#39;t actually read, write, or execute the file: for example network filesystem access controls, ACLs (access control lists), read-only filesystems, and unrecognized executable formats. Note that the use of these six specific operators to verify if some operation is possible is usually a mistake, because it may be open to race conditions.</p>

<p>Also note that, for the superuser on the local filesystems, the <code>-r</code>, <code>-R</code>, <code>-w</code>, and <code>-W</code> tests always return 1, and <code>-x</code> and <code>-X</code> return 1 if any execute bit is set in the mode. Scripts run by the superuser may thus need to do a <a href="CORE.html#stat-FILEHANDLE"><code>stat</code></a> to determine the actual mode of the file, or temporarily set their effective uid to something else.</p>

<p>If you are using ACLs, there is a pragma called <a href="https://metacpan.org/pod/filetest"><code>filetest</code></a> that may produce more accurate results than the bare <a href="CORE.html#stat-FILEHANDLE"><code>stat</code></a> mode bits. When under <code>use filetest &#39;access&#39;</code>, the above-mentioned filetests test whether the permission can(not) be granted using the <a href="http://man.he.net/man2/access">access(2)</a> family of system calls. Also note that the <code>-x</code> and <code>-X</code> tests may under this pragma return true even if there are no execute permission bits set (nor any extra execute permission ACLs). This strangeness is due to the underlying system calls&#39; definitions. Note also that, due to the implementation of <code>use filetest &#39;access&#39;</code>, the <code>_</code> special filehandle won&#39;t cache the results of the file tests when this pragma is in effect. Read the documentation for the <a href="https://metacpan.org/pod/filetest"><code>filetest</code></a> pragma for more information.</p>

<p>The <code>-T</code> and <code>-B</code> tests work as follows. The first block or so of the file is examined to see if it is valid UTF-8 that includes non-ASCII characters. If so, it&#39;s a <code>-T</code> file. Otherwise, that same portion of the file is examined for odd characters such as strange control codes or characters with the high bit set. If more than a third of the characters are strange, it&#39;s a <code>-B</code> file; otherwise it&#39;s a <code>-T</code> file. Also, any file containing a zero byte in the examined portion is considered a binary file. (If executed within the scope of a <a href="https://metacpan.org/pod/distribution/perl/pod/perllocale.pod"><span style="white-space: nowrap;">use locale</span></a> which includes <code>LC_CTYPE</code>, odd characters are anything that isn&#39;t a printable nor space in the current locale.) If <code>-T</code> or <code>-B</code> is used on a filehandle, the current IO buffer is examined rather than the first block. Both <code>-T</code> and <code>-B</code> return true on an empty file, or a file at EOF when testing a filehandle. Because you have to read a file to do the <code>-T</code> test, on most occasions you want to use a <code>-f</code> against the file first, as in <code>next unless -f $file &amp;&amp; -T $file</code>.</p>

<p>If any of the file tests (or either the <a href="CORE.html#stat-FILEHANDLE"><code>stat</code></a> or <a href="CORE.html#lstat-FILEHANDLE"><code>lstat</code></a> operator) is given the special filehandle consisting of a solitary underline, then the stat structure of the previous file test (or <a href="CORE.html#stat-FILEHANDLE"><code>stat</code></a> operator) is used, saving a system call. (This doesn&#39;t work with <code>-t</code>, and you need to remember that <a href="CORE.html#lstat-FILEHANDLE"><code>lstat</code></a> and <code>-l</code> leave values in the stat structure for the symbolic link, not the real file.) (Also, if the stat buffer was filled by an <a href="CORE.html#lstat-FILEHANDLE"><code>lstat</code></a> call, <code>-T</code> and <code>-B</code> will reset it with the results of <code>stat _</code>). Example:</p>

<pre><code>    print &quot;Can do.\n&quot; if -r $a || -w _ || -x _;

    stat($filename);
    print &quot;Readable\n&quot; if -r _;
    print &quot;Writable\n&quot; if -w _;
    print &quot;Executable\n&quot; if -x _;
    print &quot;Setuid\n&quot; if -u _;
    print &quot;Setgid\n&quot; if -g _;
    print &quot;Sticky\n&quot; if -k _;
    print &quot;Text\n&quot; if -T _;
    print &quot;Binary\n&quot; if -B _;</code></pre>

<p>As of Perl 5.10.0, as a form of purely syntactic sugar, you can stack file test operators, in a way that <code>-f -w -x $file</code> is equivalent to <code>-x $file &amp;&amp; -w _ &amp;&amp; -f _</code>. (This is only fancy syntax: if you use the return value of <code>-f $file</code> as an argument to another filetest operator, no special magic will happen.)</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#-X">&quot;-X&quot; in perlport</a>.</p>

<p>To avoid confusing would-be users of your code with mysterious syntax errors, put something like this at the top of your script:</p>

<pre><code>    use v5.10;  # so filetest ops can stack</code></pre>

</dd>
<dt id="abs-VALUE"><a id="abs"></a>abs VALUE  </dt>
<dd>

</dd>
<dt id="abs1">abs</dt>
<dd>

<p>Returns the absolute value of its argument. If VALUE is omitted, uses <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a>.</p>

</dd>
<dt id="accept-NEWSOCKET,GENERICSOCKET"><a id="accept"></a><a id="accept-NEWSOCKET-GENERICSOCKET"></a>accept NEWSOCKET,GENERICSOCKET </dt>
<dd>

<p>Accepts an incoming socket connect, just as <a href="http://man.he.net/man2/accept">accept(2)</a> does. Returns the packed address if it succeeded, false otherwise. See the example in <a href="https://metacpan.org/pod/distribution/perl/pod/perlipc.pod#Sockets:-Client/Server-Communication">&quot;Sockets: Client/Server Communication&quot; in perlipc</a>.</p>

<p>On systems that support a close-on-exec flag on files, the flag will be set for the newly opened file descriptor, as determined by the value of <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$%5EF"><code>$^F</code></a>. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$%5EF">&quot;$^F&quot; in perlvar</a>.</p>

</dd>
<dt id="alarm-SECONDS"><a id="alarm"></a>alarm SECONDS   </dt>
<dd>

</dd>
<dt id="alarm1">alarm</dt>
<dd>

<p>Arranges to have a SIGALRM delivered to this process after the specified number of wallclock seconds has elapsed. If SECONDS is not specified, the value stored in <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a> is used. (On some machines, unfortunately, the elapsed time may be up to one second less or more than you specified because of how seconds are counted, and process scheduling may delay the delivery of the signal even further.)</p>

<p>Only one timer may be counting at once. Each call disables the previous timer, and an argument of <code>0</code> may be supplied to cancel the previous timer without starting a new one. The returned value is the amount of time remaining on the previous timer.</p>

<p>For delays of finer granularity than one second, the <a href="https://metacpan.org/pod/Time::HiRes">Time::HiRes</a> module (from CPAN, and starting from Perl 5.8 part of the standard distribution) provides <a href="https://metacpan.org/pod/Time::HiRes#ualarm-(-$useconds-%5B,-$interval_useconds-%5D-)"><code>ualarm</code></a>. You may also use Perl&#39;s four-argument version of <a href="CORE.html#select-RBITS,WBITS,EBITS,TIMEOUT"><code>select</code></a> leaving the first three arguments undefined, or you might be able to use the <a href="CORE.html#syscall-NUMBER,-LIST"><code>syscall</code></a> interface to access <a href="http://man.he.net/man2/setitimer">setitimer(2)</a> if your system supports it. See <a href="https://metacpan.org/pod/perlfaq8">perlfaq8</a> for details.</p>

<p>It is usually a mistake to intermix <a href="CORE.html#alarm-SECONDS"><code>alarm</code></a> and <a href="CORE.html#sleep-EXPR"><code>sleep</code></a> calls, because <a href="CORE.html#sleep-EXPR"><code>sleep</code></a> may be internally implemented on your system with <a href="CORE.html#alarm-SECONDS"><code>alarm</code></a>.</p>

<p>If you want to use <a href="CORE.html#alarm-SECONDS"><code>alarm</code></a> to time out a system call you need to use an <a href="CORE.html#eval-EXPR"><code>eval</code></a>/<a href="CORE.html#die-LIST"><code>die</code></a> pair. You can&#39;t rely on the alarm causing the system call to fail with <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$!"><code>$!</code></a> set to <code>EINTR</code> because Perl sets up signal handlers to restart system calls on some systems. Using <a href="CORE.html#eval-EXPR"><code>eval</code></a>/<a href="CORE.html#die-LIST"><code>die</code></a> always works, modulo the caveats given in <a href="https://metacpan.org/pod/distribution/perl/pod/perlipc.pod#Signals">&quot;Signals&quot; in perlipc</a>.</p>

<pre><code>    eval {
        local $SIG{ALRM} = sub { die &quot;alarm\n&quot; }; # NB: \n required
        alarm $timeout;
        my $nread = sysread $socket, $buffer, $size;
        alarm 0;
    };
    if ($@) {
        die unless $@ eq &quot;alarm\n&quot;;   # propagate unexpected errors
        # timed out
    }
    else {
        # didn&#39;t
    }</code></pre>

<p>For more information see <a href="https://metacpan.org/pod/distribution/perl/pod/perlipc.pod">perlipc</a>.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#alarm">&quot;alarm&quot; in perlport</a>.</p>

</dd>
<dt id="atan2-Y,X"><a id="atan2"></a><a id="atan2-Y-X"></a>atan2 Y,X    </dt>
<dd>

<p>Returns the arctangent of Y/X in the range -PI to PI.</p>

<p>For the tangent operation, you may use the <a href="https://metacpan.org/pod/Math::Trig#tan"><code>Math::Trig::tan</code></a> function, or use the familiar relation:</p>

<pre><code>    sub tan { sin($_[0]) / cos($_[0])  }</code></pre>

<p>The return value for <code>atan2(0,0)</code> is implementation-defined; consult your <a href="http://man.he.net/man3/atan2">atan2(3)</a> manpage for more information.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#atan2">&quot;atan2&quot; in perlport</a>.</p>

</dd>
<dt id="bind-SOCKET,NAME"><a id="bind"></a><a id="bind-SOCKET-NAME"></a>bind SOCKET,NAME </dt>
<dd>

<p>Binds a network address to a socket, just as <a href="http://man.he.net/man2/bind">bind(2)</a> does. Returns true if it succeeded, false otherwise. NAME should be a packed address of the appropriate type for the socket. See the examples in <a href="https://metacpan.org/pod/distribution/perl/pod/perlipc.pod#Sockets:-Client/Server-Communication">&quot;Sockets: Client/Server Communication&quot; in perlipc</a>.</p>

</dd>
<dt id="binmode-FILEHANDLE,-LAYER"><a id="binmode"></a><a id="binmode-FILEHANDLE--LAYER"></a>binmode FILEHANDLE, LAYER     </dt>
<dd>

</dd>
<dt id="binmode-FILEHANDLE"><a id="binmode1"></a>binmode FILEHANDLE</dt>
<dd>

<p>Arranges for FILEHANDLE to be read or written in &quot;binary&quot; or &quot;text&quot; mode on systems where the run-time libraries distinguish between binary and text files. If FILEHANDLE is an expression, the value is taken as the name of the filehandle. Returns true on success, otherwise it returns <a href="CORE.html#undef-EXPR"><code>undef</code></a> and sets <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$!"><code>$!</code></a> (errno).</p>

<p>On some systems (in general, DOS- and Windows-based systems) <a href="CORE.html#binmode-FILEHANDLE,-LAYER"><code>binmode</code></a> is necessary when you&#39;re not working with a text file. For the sake of portability it is a good idea always to use it when appropriate, and never to use it when it isn&#39;t appropriate. Also, people can set their I/O to be by default UTF8-encoded Unicode, not bytes.</p>

<p>In other words: regardless of platform, use <a href="CORE.html#binmode-FILEHANDLE,-LAYER"><code>binmode</code></a> on binary data, like images, for example.</p>

<p>If LAYER is present it is a single string, but may contain multiple directives. The directives alter the behaviour of the filehandle. When LAYER is present, using binmode on a text file makes sense.</p>

<p>If LAYER is omitted or specified as <code>:raw</code> the filehandle is made suitable for passing binary data. This includes turning off possible CRLF translation and marking it as bytes (as opposed to Unicode characters). Note that, despite what may be implied in <i>&quot;Programming Perl&quot;</i> (the Camel, 3rd edition) or elsewhere, <code>:raw</code> is <i>not</i> simply the inverse of <code>:crlf</code>. Other layers that would affect the binary nature of the stream are <i>also</i> disabled. See <a href="https://metacpan.org/pod/PerlIO">PerlIO</a>, and the discussion about the PERLIO environment variable in <a href="https://metacpan.org/pod/distribution/perl/pod/perlrun.pod#PERLIO">perlrun</a>.</p>

<p>The <code>:bytes</code>, <code>:crlf</code>, <code>:utf8</code>, and any other directives of the form <code>:...</code>, are called I/O <i>layers</i>. The <a href="https://metacpan.org/pod/open">open</a> pragma can be used to establish default I/O layers.</p>

<p><i>The LAYER parameter of the <a href="CORE.html#binmode-FILEHANDLE,-LAYER"><code>binmode</code></a> function is described as &quot;DISCIPLINE&quot; in &quot;Programming Perl, 3rd Edition&quot;. However, since the publishing of this book, by many known as &quot;Camel III&quot;, the consensus of the naming of this functionality has moved from &quot;discipline&quot; to &quot;layer&quot;. All documentation of this version of Perl therefore refers to &quot;layers&quot; rather than to &quot;disciplines&quot;. Now back to the regularly scheduled documentation...</i></p>

<p>To mark FILEHANDLE as UTF-8, use <code>:utf8</code> or <code>:encoding(UTF-8)</code>. <code>:utf8</code> just marks the data as UTF-8 without further checking, while <code>:encoding(UTF-8)</code> checks the data for actually being valid UTF-8. More details can be found in <a href="https://metacpan.org/pod/PerlIO::encoding">PerlIO::encoding</a>.</p>

<p>In general, <a href="CORE.html#binmode-FILEHANDLE,-LAYER"><code>binmode</code></a> should be called after <a href="CORE.html#open-FILEHANDLE,MODE,EXPR"><code>open</code></a> but before any I/O is done on the filehandle. Calling <a href="CORE.html#binmode-FILEHANDLE,-LAYER"><code>binmode</code></a> normally flushes any pending buffered output data (and perhaps pending input data) on the handle. An exception to this is the <code>:encoding</code> layer that changes the default character encoding of the handle. The <code>:encoding</code> layer sometimes needs to be called in mid-stream, and it doesn&#39;t flush the stream. <code>:encoding</code> also implicitly pushes on top of itself the <code>:utf8</code> layer because internally Perl operates on UTF8-encoded Unicode characters.</p>

<p>The operating system, device drivers, C libraries, and Perl run-time system all conspire to let the programmer treat a single character (<code>\n</code>) as the line terminator, irrespective of external representation. On many operating systems, the native text file representation matches the internal representation, but on some platforms the external representation of <code>\n</code> is made up of more than one character.</p>

<p>All variants of Unix, Mac OS (old and new), and Stream_LF files on VMS use a single character to end each line in the external representation of text (even though that single character is CARRIAGE RETURN on old, pre-Darwin flavors of Mac OS, and is LINE FEED on Unix and most VMS files). In other systems like OS/2, DOS, and the various flavors of MS-Windows, your program sees a <code>\n</code> as a simple <code>\cJ</code>, but what&#39;s stored in text files are the two characters <code>\cM\cJ</code>. That means that if you don&#39;t use <a href="CORE.html#binmode-FILEHANDLE,-LAYER"><code>binmode</code></a> on these systems, <code>\cM\cJ</code> sequences on disk will be converted to <code>\n</code> on input, and any <code>\n</code> in your program will be converted back to <code>\cM\cJ</code> on output. This is what you want for text files, but it can be disastrous for binary files.</p>

<p>Another consequence of using <a href="CORE.html#binmode-FILEHANDLE,-LAYER"><code>binmode</code></a> (on some systems) is that special end-of-file markers will be seen as part of the data stream. For systems from the Microsoft family this means that, if your binary data contain <code>\cZ</code>, the I/O subsystem will regard it as the end of the file, unless you use <a href="CORE.html#binmode-FILEHANDLE,-LAYER"><code>binmode</code></a>.</p>

<p><a href="CORE.html#binmode-FILEHANDLE,-LAYER"><code>binmode</code></a> is important not only for <a href="CORE.html#readline-EXPR"><code>readline</code></a> and <a href="CORE.html#print-FILEHANDLE-LIST"><code>print</code></a> operations, but also when using <a href="CORE.html#read-FILEHANDLE,SCALAR,LENGTH,OFFSET"><code>read</code></a>, <a href="CORE.html#seek-FILEHANDLE,POSITION,WHENCE"><code>seek</code></a>, <a href="CORE.html#sysread-FILEHANDLE,SCALAR,LENGTH,OFFSET"><code>sysread</code></a>, <a href="CORE.html#syswrite-FILEHANDLE,SCALAR,LENGTH,OFFSET"><code>syswrite</code></a> and <a href="CORE.html#tell-FILEHANDLE"><code>tell</code></a> (see <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod">perlport</a> for more details). See the <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$/"><code>$/</code></a> and <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$%5C"><code>$\</code></a> variables in <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod">perlvar</a> for how to manually set your input and output line-termination sequences.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#binmode">&quot;binmode&quot; in perlport</a>.</p>

</dd>
<dt id="bless-REF,CLASSNAME"><a id="bless"></a><a id="bless-REF-CLASSNAME"></a>bless REF,CLASSNAME </dt>
<dd>

</dd>
<dt id="bless-REF"><a id="bless1"></a>bless REF</dt>
<dd>

<p><code>bless</code> tells Perl to mark the item referred to by <code>REF</code> as an object in a package. The two-argument version of <code>bless</code> is always preferable unless there is a specific reason to <i>not</i> use it.</p>

<ul>

<li><p>Bless the referred-to item into a specific package (recommended form):</p>

<pre><code>    bless $ref, $package;</code></pre>

<p>The two-argument form adds the object to the package specified as the second argument.</p>

</li>
<li><p>Bless the referred-to item into package <code>main</code>:</p>

<pre><code>    bless $ref, &quot;&quot;;</code></pre>

<p>If the second argument is an empty string, <code>bless</code> adds the object to package <code>main</code>.</p>

</li>
<li><p>Bless the referred-to item into the current package (not inheritable):</p>

<pre><code>    bless $ref;</code></pre>

<p>If <code>bless</code> is used without its second argument, the object is created in the current package. The second argument should always be supplied if a derived class might inherit a method executing <code>bless</code>. Because it is a potential source of bugs, one-argument <code>bless</code> is discouraged.</p>

</li>
</ul>

<p>See <a href="https://metacpan.org/pod/distribution/perl/pod/perlobj.pod">perlobj</a> for more about the blessing (and blessings) of objects.</p>

<p><a href="CORE.html#bless-REF,CLASSNAME"><code>bless</code></a> returns its first argument, the supplied reference, as the value of the function; since <code>bless</code> is commonly the last thing executed in constructors, this means that the reference to the object is returned as the constructor&#39;s value and allows the caller to immediately use this returned object in method calls.</p>

<p><code>CLASSNAME</code> should always be a mixed-case name, as all-uppercase and all-lowercase names are meant to be used only for Perl builtin types and pragmas, respectively. Avoid creating all-uppercase or all-lowercase package names to prevent confusion.</p>

<p>Also avoid &lt;Cbless&gt;ing things into the class name <code>0</code>; this will cause code which (erroneously) checks the result of <a href="CORE.html#ref-EXPR"><code>ref</code></a> to see if a reference is <code>bless</code>ed to fail, as &quot;0&quot;, a falsy value, is returned.</p>

<p>See <a href="https://metacpan.org/pod/distribution/perl/pod/perlmod.pod#Perl-Modules">&quot;Perl Modules&quot; in perlmod</a> for more details.</p>

</dd>
<dt id="break">break</dt>
<dd>

<p>Break out of a <code>given</code> block.</p>

<p><a href="CORE.html#break"><code>break</code></a> is available only if the <a href="https://metacpan.org/pod/feature#The-&#39;switch&#39;-feature"><code>&quot;switch&quot;</code> feature</a> is enabled or if it is prefixed with <code>CORE::</code>. The <a href="https://metacpan.org/pod/feature#The-&#39;switch&#39;-feature"><code>&quot;switch&quot;</code> feature</a> is enabled automatically with a <code>use v5.10</code> (or higher) declaration in the current scope.</p>

</dd>
<dt id="caller-EXPR"><a id="caller"></a>caller EXPR    </dt>
<dd>

</dd>
<dt id="caller1">caller</dt>
<dd>

<p>Returns the context of the current pure perl subroutine call. In scalar context, returns the caller&#39;s package name if there <i>is</i> a caller (that is, if we&#39;re in a subroutine or <a href="CORE.html#eval-EXPR"><code>eval</code></a> or <a href="CORE.html#require-VERSION"><code>require</code></a>) and the undefined value otherwise. caller never returns XS subs and they are skipped. The next pure perl sub will appear instead of the XS sub in caller&#39;s return values. In list context, caller returns</p>

<pre><code>       # 0         1          2
    my ($package, $filename, $line) = caller;</code></pre>

<p>Like <a href="CORE.html#__FILE__"><code>__FILE__</code></a> and <a href="CORE.html#__LINE__"><code>__LINE__</code></a>, the filename and line number returned here may be altered by the mechanism described at <a href="https://metacpan.org/pod/distribution/perl/pod/perlsyn.pod#Plain-Old-Comments-(Not!)">&quot;Plain Old Comments (Not!)&quot; in perlsyn</a>.</p>

<p>With EXPR, it returns some extra information that the debugger uses to print a stack trace. The value of EXPR indicates how many call frames to go back before the current one.</p>

<pre><code>    #  0         1          2      3            4
 my ($package, $filename, $line, $subroutine, $hasargs,

    #  5          6          7            8       9         10
    $wantarray, $evaltext, $is_require, $hints, $bitmask, $hinthash)
  = caller($i);</code></pre>

<p>Here, $subroutine is the function that the caller called (rather than the function containing the caller). Note that $subroutine may be <code>(eval)</code> if the frame is not a subroutine call, but an <a href="CORE.html#eval-EXPR"><code>eval</code></a>. In such a case additional elements $evaltext and <code>$is_require</code> are set: <code>$is_require</code> is true if the frame is created by a <a href="CORE.html#require-VERSION"><code>require</code></a> or <a href="CORE.html#use-Module-VERSION-LIST"><code>use</code></a> statement, $evaltext contains the text of the <code>eval EXPR</code> statement. In particular, for an <code>eval BLOCK</code> statement, $subroutine is <code>(eval)</code>, but $evaltext is undefined. (Note also that each <a href="CORE.html#use-Module-VERSION-LIST"><code>use</code></a> statement creates a <a href="CORE.html#require-VERSION"><code>require</code></a> frame inside an <code>eval EXPR</code> frame.) $subroutine may also be <code>(unknown)</code> if this particular subroutine happens to have been deleted from the symbol table. <code>$hasargs</code> is true if a new instance of <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#@_"><code>@_</code></a> was set up for the frame. <code>$hints</code> and <code>$bitmask</code> contain pragmatic hints that the caller was compiled with. <code>$hints</code> corresponds to <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$%5EH"><code>$^H</code></a>, and <code>$bitmask</code> corresponds to <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$%7B%5EWARNING_BITS%7D"><code>${^WARNING_BITS}</code></a>. The <code>$hints</code> and <code>$bitmask</code> values are subject to change between versions of Perl, and are not meant for external use.</p>

<p><code>$hinthash</code> is a reference to a hash containing the value of <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#%25%5EH"><code>%^H</code></a> when the caller was compiled, or <a href="CORE.html#undef-EXPR"><code>undef</code></a> if <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#%25%5EH"><code>%^H</code></a> was empty. Do not modify the values of this hash, as they are the actual values stored in the optree.</p>

<p>Note that the only types of call frames that are visible are subroutine calls and <code>eval</code>. Other forms of context, such as <code>while</code> or <code>foreach</code> loops or <code>try</code> blocks are not considered interesting to <code>caller</code>, as they do not alter the behaviour of the <code>return</code> expression.</p>

<p>Furthermore, when called from within the DB package in list context, and with an argument, caller returns more detailed information: it sets the list variable <code>@DB::args</code> to be the arguments with which the subroutine was invoked.</p>

<p>Be aware that the optimizer might have optimized call frames away before <a href="CORE.html#caller-EXPR"><code>caller</code></a> had a chance to get the information. That means that <code>caller(N)</code> might not return information about the call frame you expect it to, for <code>N &gt; 1</code>. In particular, <code>@DB::args</code> might have information from the previous time <a href="CORE.html#caller-EXPR"><code>caller</code></a> was called.</p>

<p>Be aware that setting <code>@DB::args</code> is <i>best effort</i>, intended for debugging or generating backtraces, and should not be relied upon. In particular, as <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#@_"><code>@_</code></a> contains aliases to the caller&#39;s arguments, Perl does not take a copy of <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#@_"><code>@_</code></a>, so <code>@DB::args</code> will contain modifications the subroutine makes to <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#@_"><code>@_</code></a> or its contents, not the original values at call time. <code>@DB::args</code>, like <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#@_"><code>@_</code></a>, does not hold explicit references to its elements, so under certain cases its elements may have become freed and reallocated for other variables or temporary values. Finally, a side effect of the current implementation is that the effects of <code>shift @_</code> can <i>normally</i> be undone (but not <code>pop @_</code> or other splicing, <i>and</i> not if a reference to <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#@_"><code>@_</code></a> has been taken, <i>and</i> subject to the caveat about reallocated elements), so <code>@DB::args</code> is actually a hybrid of the current state and initial state of <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#@_"><code>@_</code></a>. Buyer beware.</p>

</dd>
<dt id="chdir-EXPR"><a id="chdir"></a>chdir EXPR   </dt>
<dd>

</dd>
<dt id="chdir-FILEHANDLE"><a id="chdir1"></a>chdir FILEHANDLE</dt>
<dd>

</dd>
<dt id="chdir-DIRHANDLE"><a id="chdir2"></a>chdir DIRHANDLE</dt>
<dd>

</dd>
<dt id="chdir3">chdir</dt>
<dd>

<p>Changes the working directory to EXPR, if possible. If EXPR is omitted, changes to the directory specified by <code>$ENV{HOME}</code>, if set; if not, changes to the directory specified by <code>$ENV{LOGDIR}</code>. (Under VMS, the variable <code>$ENV{&#39;SYS$LOGIN&#39;}</code> is also checked, and used if it is set.) If neither is set, <a href="CORE.html#chdir-EXPR"><code>chdir</code></a> does nothing and fails. It returns true on success, false otherwise. See the example under <a href="CORE.html#die-LIST"><code>die</code></a>.</p>

<p>On systems that support <a href="http://man.he.net/man2/fchdir">fchdir(2)</a>, you may pass a filehandle or directory handle as the argument. On systems that don&#39;t support <a href="http://man.he.net/man2/fchdir">fchdir(2)</a>, passing handles raises an exception.</p>

</dd>
<dt id="chmod-LIST"><a id="chmod"></a>chmod LIST   </dt>
<dd>

<p>Changes the permissions of a list of files. The first element of the list must be the numeric mode, which should probably be an octal number, and which definitely should <i>not</i> be a string of octal digits: <code>0644</code> is okay, but <code>&quot;0644&quot;</code> is not. Returns the number of files successfully changed. See also <a href="CORE.html#oct-EXPR"><code>oct</code></a> if all you have is a string.</p>

<pre><code>    my $cnt = chmod 0755, &quot;foo&quot;, &quot;bar&quot;;
    chmod 0755, @executables;
    my $mode = &quot;0644&quot;; chmod $mode, &quot;foo&quot;;      # !!! sets mode to
                                                # --w----r-T
    my $mode = &quot;0644&quot;; chmod oct($mode), &quot;foo&quot;; # this is better
    my $mode = 0644;   chmod $mode, &quot;foo&quot;;      # this is best</code></pre>

<p>On systems that support <a href="http://man.he.net/man2/fchmod">fchmod(2)</a>, you may pass filehandles among the files. On systems that don&#39;t support <a href="http://man.he.net/man2/fchmod">fchmod(2)</a>, passing filehandles raises an exception. Filehandles must be passed as globs or glob references to be recognized; barewords are considered filenames.</p>

<pre><code>    open(my $fh, &quot;&lt;&quot;, &quot;foo&quot;);
    my $perm = (stat $fh)[2] &amp; 07777;
    chmod($perm | 0600, $fh);</code></pre>

<p>You can also import the symbolic <code>S_I*</code> constants from the <a href="https://metacpan.org/pod/Fcntl"><code>Fcntl</code></a> module:</p>

<pre><code>    use Fcntl qw( :mode );
    chmod S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH, @executables;
    # Identical to the chmod 0755 of the example above.</code></pre>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#chmod">&quot;chmod&quot; in perlport</a>.</p>

</dd>
<dt id="chomp-VARIABLE"><a id="chomp"></a>chomp VARIABLE     </dt>
<dd>

</dd>
<dt id="chomp(-LIST-)"><a id="chomp1"></a><a id="chomp--LIST"></a>chomp( LIST )</dt>
<dd>

</dd>
<dt id="chomp2">chomp</dt>
<dd>

<p>This safer version of <a href="CORE.html#chop-VARIABLE"><code>chop</code></a> removes any trailing string that corresponds to the current value of <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$/"><code>$/</code></a> (also known as <code>$INPUT_RECORD_SEPARATOR</code> in the <a href="https://metacpan.org/pod/English"><code>English</code></a> module). It returns the total number of characters removed from all its arguments. It&#39;s often used to remove the newline from the end of an input record when you&#39;re worried that the final record may be missing its newline. When in paragraph mode (<code>$/ = &#39;&#39;</code>), it removes all trailing newlines from the string. When in slurp mode (<code>$/ = undef</code>) or fixed-length record mode (<a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$/"><code>$/</code></a> is a reference to an integer or the like; see <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod">perlvar</a>), <a href="CORE.html#chomp-VARIABLE"><code>chomp</code></a> won&#39;t remove anything. If VARIABLE is omitted, it chomps <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a>. Example:</p>

<pre><code>    while (&lt;&gt;) {
        chomp;  # avoid \n on last field
        my @array = split(/:/);
        # ...
    }</code></pre>

<p>If VARIABLE is a hash, it chomps the hash&#39;s values, but not its keys, resetting the <a href="CORE.html#each-HASH"><code>each</code></a> iterator in the process.</p>

<p>You can actually chomp anything that&#39;s an lvalue, including an assignment:</p>

<pre><code>    chomp(my $cwd = `pwd`);
    chomp(my $answer = &lt;STDIN&gt;);</code></pre>

<p>If you chomp a list, each element is chomped, and the total number of characters removed is returned.</p>

<p>Note that parentheses are necessary when you&#39;re chomping anything that is not a simple variable. This is because <code>chomp $cwd = `pwd`;</code> is interpreted as <code>(chomp $cwd) = `pwd`;</code>, rather than as <code>chomp( $cwd = `pwd` )</code> which you might expect. Similarly, <code>chomp $a, $b</code> is interpreted as <code>chomp($a), $b</code> rather than as <code>chomp($a, $b)</code>.</p>

</dd>
<dt id="chop-VARIABLE"><a id="chop"></a>chop VARIABLE </dt>
<dd>

</dd>
<dt id="chop(-LIST-)"><a id="chop1"></a><a id="chop--LIST"></a>chop( LIST )</dt>
<dd>

</dd>
<dt id="chop2">chop</dt>
<dd>

<p>Chops off the last character of a string and returns the character chopped. It is much more efficient than <code>s/.$//s</code> because it neither scans nor copies the string. If VARIABLE is omitted, chops <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a>. If VARIABLE is a hash, it chops the hash&#39;s values, but not its keys, resetting the <a href="CORE.html#each-HASH"><code>each</code></a> iterator in the process.</p>

<p>You can actually chop anything that&#39;s an lvalue, including an assignment.</p>

<p>If you chop a list, each element is chopped. Only the value of the last <a href="CORE.html#chop-VARIABLE"><code>chop</code></a> is returned.</p>

<p>Note that <a href="CORE.html#chop-VARIABLE"><code>chop</code></a> returns the last character. To return all but the last character, use <code>substr($string, 0, -1)</code>.</p>

<p>See also <a href="CORE.html#chomp-VARIABLE"><code>chomp</code></a>.</p>

</dd>
<dt id="chown-LIST"><a id="chown"></a>chown LIST    </dt>
<dd>

<p>Changes the owner (and group) of a list of files. The first two elements of the list must be the <i>numeric</i> uid and gid, in that order. A value of -1 in either position is interpreted by most systems to leave that value unchanged. Returns the number of files successfully changed.</p>

<pre><code>    my $cnt = chown $uid, $gid, &#39;foo&#39;, &#39;bar&#39;;
    chown $uid, $gid, @filenames;</code></pre>

<p>On systems that support <a href="http://man.he.net/man2/fchown">fchown(2)</a>, you may pass filehandles among the files. On systems that don&#39;t support <a href="http://man.he.net/man2/fchown">fchown(2)</a>, passing filehandles raises an exception. Filehandles must be passed as globs or glob references to be recognized; barewords are considered filenames.</p>

<p>Here&#39;s an example that looks up nonnumeric uids in the passwd file:</p>

<pre><code>    print &quot;User: &quot;;
    chomp(my $user = &lt;STDIN&gt;);
    print &quot;Files: &quot;;
    chomp(my $pattern = &lt;STDIN&gt;);

    my ($login,$pass,$uid,$gid) = getpwnam($user)
        or die &quot;$user not in passwd file&quot;;

    my @ary = glob($pattern);  # expand filenames
    chown $uid, $gid, @ary;</code></pre>

<p>On most systems, you are not allowed to change the ownership of the file unless you&#39;re the superuser, although you should be able to change the group to any of your secondary groups. On insecure systems, these restrictions may be relaxed, but this is not a portable assumption. On POSIX systems, you can detect this condition this way:</p>

<pre><code>    use POSIX qw(sysconf _PC_CHOWN_RESTRICTED);
    my $can_chown_giveaway = ! sysconf(_PC_CHOWN_RESTRICTED);</code></pre>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#chown">&quot;chown&quot; in perlport</a>.</p>

</dd>
<dt id="chr-NUMBER"><a id="chr"></a>chr NUMBER    </dt>
<dd>

</dd>
<dt id="chr1">chr</dt>
<dd>

<p>Returns the character represented by that NUMBER in the character set. For example, <code>chr(65)</code> is <code>&quot;A&quot;</code> in either ASCII or Unicode, and chr(0x263a) is a Unicode smiley face.</p>

<p>Negative values give the Unicode replacement character (chr(0xfffd)), except under the <a href="https://metacpan.org/pod/bytes">bytes</a> pragma, where the low eight bits of the value (truncated to an integer) are used.</p>

<p>If NUMBER is omitted, uses <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a>.</p>

<p>For the reverse, use <a href="CORE.html#ord-EXPR"><code>ord</code></a>.</p>

<p>Note that characters from 128 to 255 (inclusive) are by default internally not encoded as UTF-8 for backward compatibility reasons.</p>

<p>See <a href="https://metacpan.org/pod/distribution/perl/pod/perlunicode.pod">perlunicode</a> for more about Unicode.</p>

</dd>
<dt id="chroot-FILENAME"><a id="chroot"></a>chroot FILENAME  </dt>
<dd>

</dd>
<dt id="chroot1">chroot</dt>
<dd>

<p>This function works like the system call by the same name: it makes the named directory the new root directory for all further pathnames that begin with a <code>/</code> by your process and all its children. (It doesn&#39;t change your current working directory, which is unaffected.) For security reasons, this call is restricted to the superuser. If FILENAME is omitted, does a <a href="CORE.html#chroot-FILENAME"><code>chroot</code></a> to <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a>.</p>

<p><b>NOTE:</b> It is mandatory for security to <code>chdir(&quot;/&quot;)</code> (<a href="CORE.html#chdir-EXPR"><code>chdir</code></a> to the root directory) immediately after a <a href="CORE.html#chroot-FILENAME"><code>chroot</code></a>, otherwise the current working directory may be outside of the new root.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#chroot">&quot;chroot&quot; in perlport</a>.</p>

</dd>
<dt id="class-NAMESPACE"><a id="class"></a>class NAMESPACE</dt>
<dd>

</dd>
<dt id="class-NAMESPACE-VERSION"><a id="class1"></a>class NAMESPACE VERSION</dt>
<dd>

</dd>
<dt id="class-NAMESPACE-BLOCK"><a id="class2"></a>class NAMESPACE BLOCK</dt>
<dd>

</dd>
<dt id="class-NAMESPACE-VERSION-BLOCK"><a id="class3"></a>class NAMESPACE VERSION BLOCK</dt>
<dd>

<p>Declares the BLOCK or the rest of the compilation unit as being in the given namespace, which implements an object class. This behaves similarly to <a href="CORE.html#package-NAMESPACE"><code>package</code></a>, except that the newly-created package behaves as a class.</p>

</dd>
<dt id="close-FILEHANDLE"><a id="close"></a>close FILEHANDLE </dt>
<dd>

</dd>
<dt id="close1">close</dt>
<dd>

<p>Closes the file or pipe associated with the filehandle, flushes the IO buffers, and closes the system file descriptor. Returns true if those operations succeed and if no error was reported by any PerlIO layer. Closes the currently selected filehandle if the argument is omitted.</p>

<p>You don&#39;t have to close FILEHANDLE if you are immediately going to do another <a href="CORE.html#open-FILEHANDLE,MODE,EXPR"><code>open</code></a> on it, because <a href="CORE.html#open-FILEHANDLE,MODE,EXPR"><code>open</code></a> closes it for you. (See <a href="CORE.html#open-FILEHANDLE,MODE,EXPR"><code>open</code></a>.) However, an explicit <a href="CORE.html#close-FILEHANDLE"><code>close</code></a> on an input file resets the line counter (<a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$."><code>$.</code></a>), while the implicit close done by <a href="CORE.html#open-FILEHANDLE,MODE,EXPR"><code>open</code></a> does not.</p>

<p>If the filehandle came from a piped open, <a href="CORE.html#close-FILEHANDLE"><code>close</code></a> returns false if one of the other syscalls involved fails or if its program exits with non-zero status. If the only problem was that the program exited non-zero, <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$!"><code>$!</code></a> will be set to <code>0</code>. Closing a pipe also waits for the process executing on the pipe to exit--in case you wish to look at the output of the pipe afterwards--and implicitly puts the exit status value of that command into <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$?"><code>$?</code></a> and <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$%7B%5ECHILD_ERROR_NATIVE%7D"><code>${^CHILD_ERROR_NATIVE}</code></a>.</p>

<p>If there are multiple threads running, <a href="CORE.html#close-FILEHANDLE"><code>close</code></a> on a filehandle from a piped open returns true without waiting for the child process to terminate, if the filehandle is still open in another thread.</p>

<p>Closing the read end of a pipe before the process writing to it at the other end is done writing results in the writer receiving a SIGPIPE. If the other end can&#39;t handle that, be sure to read all the data before closing the pipe.</p>

<p>Example:</p>

<pre><code>    open(OUTPUT, &#39;|sort &gt;foo&#39;)  # pipe to sort
        or die &quot;Can&#39;t start sort: $!&quot;;
    #...                        # print stuff to output
    close OUTPUT                # wait for sort to finish
        or warn $! ? &quot;Error closing sort pipe: $!&quot;
                   : &quot;Exit status $? from sort&quot;;
    open(INPUT, &#39;foo&#39;)          # get sort&#39;s results
        or die &quot;Can&#39;t open &#39;foo&#39; for input: $!&quot;;</code></pre>

<p>FILEHANDLE may be an expression whose value can be used as an indirect filehandle, usually the real filehandle name or an autovivified handle.</p>

</dd>
<dt id="closedir-DIRHANDLE"><a id="closedir"></a>closedir DIRHANDLE </dt>
<dd>

<p>Closes a directory opened by <a href="CORE.html#opendir-DIRHANDLE,EXPR"><code>opendir</code></a> and returns the success of that system call.</p>

</dd>
<dt id="connect-SOCKET,NAME"><a id="connect"></a><a id="connect-SOCKET-NAME"></a>connect SOCKET,NAME </dt>
<dd>

<p>Attempts to connect to a remote socket, just like <a href="http://man.he.net/man2/connect">connect(2)</a>. Returns true if it succeeded, false otherwise. NAME should be a packed address of the appropriate type for the socket. See the examples in <a href="https://metacpan.org/pod/distribution/perl/pod/perlipc.pod#Sockets:-Client/Server-Communication">&quot;Sockets: Client/Server Communication&quot; in perlipc</a>.</p>

</dd>
<dt id="continue-BLOCK"><a id="continue"></a>continue BLOCK </dt>
<dd>

</dd>
<dt id="continue1">continue</dt>
<dd>

<p>When followed by a BLOCK, <a href="CORE.html#continue-BLOCK"><code>continue</code></a> is actually a flow control statement rather than a function. If there is a <a href="CORE.html#continue-BLOCK"><code>continue</code></a> BLOCK attached to a BLOCK (typically in a <code>while</code> or <code>foreach</code>), it is always executed just before the conditional is about to be evaluated again, just like the third part of a <code>for</code> loop in C. Thus it can be used to increment a loop variable, even when the loop has been continued via the <a href="CORE.html#next-LABEL"><code>next</code></a> statement (which is similar to the C <a href="CORE.html#continue-BLOCK"><code>continue</code></a> statement).</p>

<p><a href="CORE.html#last-LABEL"><code>last</code></a>, <a href="CORE.html#next-LABEL"><code>next</code></a>, or <a href="CORE.html#redo-LABEL"><code>redo</code></a> may appear within a <a href="CORE.html#continue-BLOCK"><code>continue</code></a> block; <a href="CORE.html#last-LABEL"><code>last</code></a> and <a href="CORE.html#redo-LABEL"><code>redo</code></a> behave as if they had been executed within the main block. So will <a href="CORE.html#next-LABEL"><code>next</code></a>, but since it will execute a <a href="CORE.html#continue-BLOCK"><code>continue</code></a> block, it may be more entertaining.</p>

<pre><code>    while (EXPR) {
        ### redo always comes here
        do_something;
    } continue {
        ### next always comes here
        do_something_else;
        # then back the top to re-check EXPR
    }
    ### last always comes here</code></pre>

<p>Omitting the <a href="CORE.html#continue-BLOCK"><code>continue</code></a> section is equivalent to using an empty one, logically enough, so <a href="CORE.html#next-LABEL"><code>next</code></a> goes directly back to check the condition at the top of the loop.</p>

<p>When there is no BLOCK, <a href="CORE.html#continue-BLOCK"><code>continue</code></a> is a function that falls through the current <code>when</code> or <code>default</code> block instead of iterating a dynamically enclosing <code>foreach</code> or exiting a lexically enclosing <code>given</code>. In Perl 5.14 and earlier, this form of <a href="CORE.html#continue-BLOCK"><code>continue</code></a> was only available when the <a href="https://metacpan.org/pod/feature#The-&#39;switch&#39;-feature"><code>&quot;switch&quot;</code> feature</a> was enabled. See <a href="https://metacpan.org/pod/feature">feature</a> and <a href="https://metacpan.org/pod/distribution/perl/pod/perlsyn.pod#Switch-Statements">&quot;Switch Statements&quot; in perlsyn</a> for more information.</p>

</dd>
<dt id="cos-EXPR"><a id="cos"></a>cos EXPR    </dt>
<dd>

</dd>
<dt id="cos1">cos</dt>
<dd>

<p>Returns the cosine of EXPR (expressed in radians). If EXPR is omitted, takes the cosine of <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a>.</p>

<p>For the inverse cosine operation, you may use the <a href="https://metacpan.org/pod/Math::Trig"><code>Math::Trig::acos</code></a> function, or use this relation:</p>

<pre><code>    sub acos { atan2( sqrt(1 - $_[0] * $_[0]), $_[0] ) }</code></pre>

</dd>
<dt id="crypt-PLAINTEXT,SALT"><a id="crypt"></a><a id="crypt-PLAINTEXT-SALT"></a>crypt PLAINTEXT,SALT          </dt>
<dd>

<p>Creates a digest string exactly like the <a href="http://man.he.net/man3/crypt">crypt(3)</a> function in the C library (assuming that you actually have a version there that has not been extirpated as a potential munition).</p>

<p><a href="CORE.html#crypt-PLAINTEXT,SALT"><code>crypt</code></a> is a one-way hash function. The PLAINTEXT and SALT are turned into a short string, called a digest, which is returned. The same PLAINTEXT and SALT will always return the same string, but there is no (known) way to get the original PLAINTEXT from the hash. Small changes in the PLAINTEXT or SALT will result in large changes in the digest.</p>

<p>There is no decrypt function. This function isn&#39;t all that useful for cryptography (for that, look for <i>Crypt</i> modules on your nearby CPAN mirror) and the name &quot;crypt&quot; is a bit of a misnomer. Instead it is primarily used to check if two pieces of text are the same without having to transmit or store the text itself. An example is checking if a correct password is given. The digest of the password is stored, not the password itself. The user types in a password that is <a href="CORE.html#crypt-PLAINTEXT,SALT"><code>crypt</code></a>&#39;d with the same salt as the stored digest. If the two digests match, the password is correct.</p>

<p>When verifying an existing digest string you should use the digest as the salt (like <code>crypt($plain, $digest) eq $digest</code>). The SALT used to create the digest is visible as part of the digest. This ensures <a href="CORE.html#crypt-PLAINTEXT,SALT"><code>crypt</code></a> will hash the new string with the same salt as the digest. This allows your code to work with the standard <a href="CORE.html#crypt-PLAINTEXT,SALT"><code>crypt</code></a> and with more exotic implementations. In other words, assume nothing about the returned string itself nor about how many bytes of SALT may matter.</p>

<p>Traditionally the result is a string of 13 bytes: two first bytes of the salt, followed by 11 bytes from the set <code>[./0-9A-Za-z]</code>, and only the first eight bytes of PLAINTEXT mattered. But alternative hashing schemes (like MD5), higher level security schemes (like C2), and implementations on non-Unix platforms may produce different strings.</p>

<p>When choosing a new salt create a random two character string whose characters come from the set <code>[./0-9A-Za-z]</code> (like <code>join &#39;&#39;, (&#39;.&#39;, &#39;/&#39;, 0..9, &#39;A&#39;..&#39;Z&#39;, &#39;a&#39;..&#39;z&#39;)[rand 64, rand 64]</code>). This set of characters is just a recommendation; the characters allowed in the salt depend solely on your system&#39;s crypt library, and Perl can&#39;t restrict what salts <a href="CORE.html#crypt-PLAINTEXT,SALT"><code>crypt</code></a> accepts.</p>

<p>Here&#39;s an example that makes sure that whoever runs this program knows their password:</p>

<pre><code>    my $pwd = (getpwuid($&lt;))[1];

    system &quot;stty -echo&quot;;
    print &quot;Password: &quot;;
    chomp(my $word = &lt;STDIN&gt;);
    print &quot;\n&quot;;
    system &quot;stty echo&quot;;

    if (crypt($word, $pwd) ne $pwd) {
        die &quot;Sorry...\n&quot;;
    } else {
        print &quot;ok\n&quot;;
    }</code></pre>

<p>Of course, typing in your own password to whoever asks you for it is unwise.</p>

<p>The <a href="CORE.html#crypt-PLAINTEXT,SALT"><code>crypt</code></a> function is unsuitable for hashing large quantities of data, not least of all because you can&#39;t get the information back. Look at the <a href="https://metacpan.org/pod/Digest">Digest</a> module for more robust algorithms.</p>

<p>If using <a href="CORE.html#crypt-PLAINTEXT,SALT"><code>crypt</code></a> on a Unicode string (which <i>potentially</i> has characters with codepoints above 255), Perl tries to make sense of the situation by trying to downgrade (a copy of) the string back to an eight-bit byte string before calling <a href="CORE.html#crypt-PLAINTEXT,SALT"><code>crypt</code></a> (on that copy). If that works, good. If not, <a href="CORE.html#crypt-PLAINTEXT,SALT"><code>crypt</code></a> dies with <a href="https://metacpan.org/pod/distribution/perl/pod/perldiag.pod#Wide-character-in-%25s"><code>Wide character in crypt</code></a>.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#crypt">&quot;crypt&quot; in perlport</a>.</p>

</dd>
<dt id="dbmclose-HASH"><a id="dbmclose"></a>dbmclose HASH </dt>
<dd>

<p>[This function has been largely superseded by the <a href="CORE.html#untie-VARIABLE"><code>untie</code></a> function.]</p>

<p>Breaks the binding between a DBM file and a hash.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#dbmclose">&quot;dbmclose&quot; in perlport</a>.</p>

</dd>
<dt id="dbmopen-HASH,DBNAME,MASK"><a id="dbmopen"></a><a id="dbmopen-HASH-DBNAME-MASK"></a>dbmopen HASH,DBNAME,MASK     </dt>
<dd>

<p>[This function has been largely superseded by the <a href="CORE.html#tie-VARIABLE,CLASSNAME,LIST"><code>tie</code></a> function.]</p>

<p>This binds a <a href="http://man.he.net/man3/dbm">dbm(3)</a>, <a href="http://man.he.net/man3/ndbm">ndbm(3)</a>, <a href="http://man.he.net/man3/sdbm">sdbm(3)</a>, <a href="http://man.he.net/man3/gdbm">gdbm(3)</a>, or Berkeley DB file to a hash. HASH is the name of the hash. (Unlike normal <a href="CORE.html#open-FILEHANDLE,MODE,EXPR"><code>open</code></a>, the first argument is <i>not</i> a filehandle, even though it looks like one). DBNAME is the name of the database (without the <i>.dir</i> or <i>.pag</i> extension if any). If the database does not exist, it is created with protection specified by MASK (as modified by the <a href="CORE.html#umask-EXPR"><code>umask</code></a>). To prevent creation of the database if it doesn&#39;t exist, you may specify a MASK of 0, and the function will return a false value if it can&#39;t find an existing database. If your system supports only the older DBM functions, you may make only one <a href="CORE.html#dbmopen-HASH,DBNAME,MASK"><code>dbmopen</code></a> call in your program. In older versions of Perl, if your system had neither DBM nor ndbm, calling <a href="CORE.html#dbmopen-HASH,DBNAME,MASK"><code>dbmopen</code></a> produced a fatal error; it now falls back to <a href="http://man.he.net/man3/sdbm">sdbm(3)</a>.</p>

<p>If you don&#39;t have write access to the DBM file, you can only read hash variables, not set them. If you want to test whether you can write, either use file tests or try setting a dummy hash entry inside an <a href="CORE.html#eval-EXPR"><code>eval</code></a> to trap the error.</p>

<p>Note that functions such as <a href="CORE.html#keys-HASH"><code>keys</code></a> and <a href="CORE.html#values-HASH"><code>values</code></a> may return huge lists when used on large DBM files. You may prefer to use the <a href="CORE.html#each-HASH"><code>each</code></a> function to iterate over large DBM files. Example:</p>

<pre><code>    # print out history file offsets
    dbmopen(%HIST,&#39;/usr/lib/news/history&#39;,0666);
    while (($key,$val) = each %HIST) {
        print $key, &#39; = &#39;, unpack(&#39;L&#39;,$val), &quot;\n&quot;;
    }
    dbmclose(%HIST);</code></pre>

<p>See also <a href="https://metacpan.org/pod/AnyDBM_File">AnyDBM_File</a> for a more general description of the pros and cons of the various dbm approaches, as well as <a href="https://metacpan.org/pod/DB_File">DB_File</a> for a particularly rich implementation.</p>

<p>You can control which DBM library you use by loading that library before you call <a href="CORE.html#dbmopen-HASH,DBNAME,MASK"><code>dbmopen</code></a>:</p>

<pre><code>    use DB_File;
    dbmopen(%NS_Hist, &quot;$ENV{HOME}/.netscape/history.db&quot;)
        or die &quot;Can&#39;t open netscape history file: $!&quot;;</code></pre>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#dbmopen">&quot;dbmopen&quot; in perlport</a>.</p>

</dd>
<dt id="defined-EXPR"><a id="defined"></a>defined EXPR   </dt>
<dd>

</dd>
<dt id="defined1">defined</dt>
<dd>

<p>Returns a Boolean value telling whether EXPR has a value other than the undefined value <a href="CORE.html#undef-EXPR"><code>undef</code></a>. If EXPR is not present, <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a> is checked.</p>

<p>Many operations return <a href="CORE.html#undef-EXPR"><code>undef</code></a> to indicate failure, end of file, system error, uninitialized variable, and other exceptional conditions. This function allows you to distinguish <a href="CORE.html#undef-EXPR"><code>undef</code></a> from other values. (A simple Boolean test will not distinguish among <a href="CORE.html#undef-EXPR"><code>undef</code></a>, zero, the empty string, and <code>&quot;0&quot;</code>, which are all equally false.) Note that since <a href="CORE.html#undef-EXPR"><code>undef</code></a> is a valid scalar, its presence doesn&#39;t <i>necessarily</i> indicate an exceptional condition: <a href="CORE.html#pop-ARRAY"><code>pop</code></a> returns <a href="CORE.html#undef-EXPR"><code>undef</code></a> when its argument is an empty array, <i>or</i> when the element to return happens to be <a href="CORE.html#undef-EXPR"><code>undef</code></a>.</p>

<p>You may also use <code>defined(&amp;func)</code> to check whether subroutine <code>func</code> has ever been defined. The return value is unaffected by any forward declarations of <code>func</code>. A subroutine that is not defined may still be callable: its package may have an <code>AUTOLOAD</code> method that makes it spring into existence the first time that it is called; see <a href="https://metacpan.org/pod/distribution/perl/pod/perlsub.pod">perlsub</a>.</p>

<p>Use of <a href="CORE.html#defined-EXPR"><code>defined</code></a> on aggregates (hashes and arrays) is no longer supported. It used to report whether memory for that aggregate had ever been allocated. You should instead use a simple test for size:</p>

<pre><code>    if (@an_array) { print &quot;has array elements\n&quot; }
    if (%a_hash)   { print &quot;has hash members\n&quot;   }</code></pre>

<p>When used on a hash element, it tells you whether the value is defined, not whether the key exists in the hash. Use <a href="CORE.html#exists-EXPR"><code>exists</code></a> for the latter purpose.</p>

<p>Examples:</p>

<pre><code>    print if defined $switch{D};
    print &quot;$val\n&quot; while defined($val = pop(@ary));
    die &quot;Can&#39;t readlink $sym: $!&quot;
        unless defined($value = readlink $sym);
    sub foo { defined &amp;$bar ? $bar-&gt;(@_) : die &quot;No bar&quot;; }
    $debugging = 0 unless defined $debugging;</code></pre>

<p>Note: Many folks tend to overuse <a href="CORE.html#defined-EXPR"><code>defined</code></a> and are then surprised to discover that the number <code>0</code> and <code>&quot;&quot;</code> (the zero-length string) are, in fact, defined values. For example, if you say</p>

<pre><code>    &quot;ab&quot; =~ /a(.*)b/;</code></pre>

<p>The pattern match succeeds and <code>$1</code> is defined, although it matched &quot;nothing&quot;. It didn&#39;t really fail to match anything. Rather, it matched something that happened to be zero characters long. This is all very above-board and honest. When a function returns an undefined value, it&#39;s an admission that it couldn&#39;t give you an honest answer. So you should use <a href="CORE.html#defined-EXPR"><code>defined</code></a> only when questioning the integrity of what you&#39;re trying to do. At other times, a simple comparison to <code>0</code> or <code>&quot;&quot;</code> is what you want.</p>

<p>See also <a href="CORE.html#undef-EXPR"><code>undef</code></a>, <a href="CORE.html#exists-EXPR"><code>exists</code></a>, <a href="CORE.html#ref-EXPR"><code>ref</code></a>.</p>

</dd>
<dt id="delete-EXPR"><a id="delete"></a>delete EXPR </dt>
<dd>

<p>Given an expression that specifies an element or slice of a hash, <a href="CORE.html#delete-EXPR"><code>delete</code></a> deletes the specified elements from that hash so that <a href="CORE.html#exists-EXPR"><code>exists</code></a> on that element no longer returns true. Setting a hash element to the undefined value does not remove its key, but deleting it does; see <a href="CORE.html#exists-EXPR"><code>exists</code></a>.</p>

<p>In list context, usually returns the value or values deleted, or the last such element in scalar context. The return list&#39;s length corresponds to that of the argument list: deleting non-existent elements returns the undefined value in their corresponding positions. Since Perl 5.28, a <a href="https://metacpan.org/pod/distribution/perl/pod/perldata.pod#Key/Value-Hash-Slices">key/value hash slice</a> can be passed to <code>delete</code>, and the return value is a list of key/value pairs (two elements for each item deleted from the hash).</p>

<p><a href="CORE.html#delete-EXPR"><code>delete</code></a> may also be used on arrays and array slices, but its behavior is less straightforward. Although <a href="CORE.html#exists-EXPR"><code>exists</code></a> will return false for deleted entries, deleting array elements never changes indices of existing values; use <a href="CORE.html#shift-ARRAY"><code>shift</code></a> or <a href="CORE.html#splice-ARRAY,OFFSET,LENGTH,LIST"><code>splice</code></a> for that. However, if any deleted elements fall at the end of an array, the array&#39;s size shrinks to the position of the highest element that still tests true for <a href="CORE.html#exists-EXPR"><code>exists</code></a>, or to 0 if none do. In other words, an array won&#39;t have trailing nonexistent elements after a delete.</p>

<p><b>WARNING:</b> Calling <a href="CORE.html#delete-EXPR"><code>delete</code></a> on array values is strongly discouraged. The notion of deleting or checking the existence of Perl array elements is not conceptually coherent, and can lead to surprising behavior.</p>

<p>Deleting from <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#%25ENV"><code>%ENV</code></a> modifies the environment. Deleting from a hash tied to a DBM file deletes the entry from the DBM file. Deleting from a <a href="CORE.html#tied-VARIABLE"><code>tied</code></a> hash or array may not necessarily return anything; it depends on the implementation of the <a href="CORE.html#tied-VARIABLE"><code>tied</code></a> package&#39;s DELETE method, which may do whatever it pleases.</p>

<p>The <code>delete local EXPR</code> construct localizes the deletion to the current block at run time. Until the block exits, elements locally deleted temporarily no longer exist. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlsub.pod#Localized-deletion-of-elements-of-composite-types">&quot;Localized deletion of elements of composite types&quot; in perlsub</a>.</p>

<pre><code>    my %hash = (foo =&gt; 11, bar =&gt; 22, baz =&gt; 33);
    my $scalar = delete $hash{foo};         # $scalar is 11
    $scalar = delete @hash{qw(foo bar)}; # $scalar is 22
    my @array  = delete @hash{qw(foo baz)}; # @array  is (undef,33)</code></pre>

<p>The following (inefficiently) deletes all the values of %HASH and @ARRAY:</p>

<pre><code>    foreach my $key (keys %HASH) {
        delete $HASH{$key};
    }

    foreach my $index (0 .. $#ARRAY) {
        delete $ARRAY[$index];
    }</code></pre>

<p>And so do these:</p>

<pre><code>    delete @HASH{keys %HASH};

    delete @ARRAY[0 .. $#ARRAY];</code></pre>

<p>But both are slower than assigning the empty list or undefining %HASH or @ARRAY, which is the customary way to empty out an aggregate:</p>

<pre><code>    %HASH = ();     # completely empty %HASH
    undef %HASH;    # forget %HASH ever existed

    @ARRAY = ();    # completely empty @ARRAY
    undef @ARRAY;   # forget @ARRAY ever existed</code></pre>

<p>The EXPR can be arbitrarily complicated provided its final operation is an element or slice of an aggregate:</p>

<pre><code>    delete $ref-&gt;[$x][$y]{$key};
    delete $ref-&gt;[$x][$y]-&gt;@{$key1, $key2, @morekeys};

    delete $ref-&gt;[$x][$y][$index];
    delete $ref-&gt;[$x][$y]-&gt;@[$index1, $index2, @moreindices];</code></pre>

</dd>
<dt id="die-LIST"><a id="die"></a>die LIST      </dt>
<dd>

<p><a href="CORE.html#die-LIST"><code>die</code></a> raises an exception. Inside an <a href="CORE.html#eval-EXPR"><code>eval</code></a> the exception is stuffed into <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$@"><code>$@</code></a> and the <a href="CORE.html#eval-EXPR"><code>eval</code></a> is terminated with the undefined value. If the exception is outside of all enclosing <a href="CORE.html#eval-EXPR"><code>eval</code></a>s, then the uncaught exception is printed to <code>STDERR</code> and perl exits with an exit code indicating failure. If you need to exit the process with a specific exit code, see <a href="CORE.html#exit-EXPR"><code>exit</code></a>.</p>

<p>Equivalent examples:</p>

<pre><code>    die &quot;Can&#39;t cd to spool: $!\n&quot; unless chdir &#39;/usr/spool/news&#39;;
    chdir &#39;/usr/spool/news&#39; or die &quot;Can&#39;t cd to spool: $!\n&quot;</code></pre>

<p>Most of the time, <code>die</code> is called with a string to use as the exception. You may either give a single non-reference operand to serve as the exception, or a list of two or more items, which will be stringified and concatenated to make the exception.</p>

<p>If the string exception does not end in a newline, the current script line number and input line number (if any) and a newline are appended to it. Note that the &quot;input line number&quot; (also known as &quot;chunk&quot;) is subject to whatever notion of &quot;line&quot; happens to be currently in effect, and is also available as the special variable <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$."><code>$.</code></a>. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$/">&quot;$/&quot; in perlvar</a> and <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$.">&quot;$.&quot; in perlvar</a>.</p>

<p>Hint: sometimes appending <code>&quot;, stopped&quot;</code> to your message will cause it to make better sense when the string <code>&quot;at foo line 123&quot;</code> is appended. Suppose you are running script &quot;canasta&quot;.</p>

<pre><code>    die &quot;/etc/games is no good&quot;;
    die &quot;/etc/games is no good, stopped&quot;;</code></pre>

<p>produce, respectively</p>

<pre><code>    /etc/games is no good at canasta line 123.
    /etc/games is no good, stopped at canasta line 123.</code></pre>

<p>If LIST was empty or made an empty string, and <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$@"><code>$@</code></a> already contains an exception value (typically from a previous <a href="CORE.html#eval-EXPR"><code>eval</code></a>), then that value is reused after appending <code>&quot;\t...propagated&quot;</code>. This is useful for propagating exceptions:</p>

<pre><code>    eval { ... };
    die unless $@ =~ /Expected exception/;</code></pre>

<p>If LIST was empty or made an empty string, and <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$@"><code>$@</code></a> contains an object reference that has a <code>PROPAGATE</code> method, that method will be called with additional file and line number parameters. The return value replaces the value in <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$@"><code>$@</code></a>; i.e., as if <code>$@ = eval { $@-&gt;PROPAGATE(__FILE__, __LINE__) };</code> were called.</p>

<p>If LIST was empty or made an empty string, and <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$@"><code>$@</code></a> is also empty, then the string <code>&quot;Died&quot;</code> is used.</p>

<p>You can also call <a href="CORE.html#die-LIST"><code>die</code></a> with a reference argument, and if this is trapped within an <a href="CORE.html#eval-EXPR"><code>eval</code></a>, <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$@"><code>$@</code></a> contains that reference. This permits more elaborate exception handling using objects that maintain arbitrary state about the exception. Such a scheme is sometimes preferable to matching particular string values of <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$@"><code>$@</code></a> with regular expressions.</p>

<p>Because Perl stringifies uncaught exception messages before display, you&#39;ll probably want to overload stringification operations on exception objects. See <a href="https://metacpan.org/pod/overload">overload</a> for details about that. The stringified message should be non-empty, and should end in a newline, in order to fit in with the treatment of string exceptions. Also, because an exception object reference cannot be stringified without destroying it, Perl doesn&#39;t attempt to append location or other information to a reference exception. If you want location information with a complex exception object, you&#39;ll have to arrange to put the location information into the object yourself.</p>

<p>Because <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$@"><code>$@</code></a> is a global variable, be careful that analyzing an exception caught by <code>eval</code> doesn&#39;t replace the reference in the global variable. It&#39;s easiest to make a local copy of the reference before any manipulations. Here&#39;s an example:</p>

<pre><code>    use Scalar::Util &quot;blessed&quot;;

    eval { ... ; die Some::Module::Exception-&gt;new( FOO =&gt; &quot;bar&quot; ) };
    if (my $ev_err = $@) {
        if (blessed($ev_err)
            &amp;&amp; $ev_err-&gt;isa(&quot;Some::Module::Exception&quot;)) {
            # handle Some::Module::Exception
        }
        else {
            # handle all other possible exceptions
        }
    }</code></pre>

<p>If an uncaught exception results in interpreter exit, the exit code is determined from the values of <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$!"><code>$!</code></a> and <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$?"><code>$?</code></a> with this pseudocode:</p>

<pre><code>    exit $! if $!;              # errno
    exit $? &gt;&gt; 8 if $? &gt;&gt; 8;    # child exit status
    exit 255;                   # last resort</code></pre>

<p>As with <a href="CORE.html#exit-EXPR"><code>exit</code></a>, <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$?"><code>$?</code></a> is set prior to unwinding the call stack; any <code>DESTROY</code> or <code>END</code> handlers can then alter this value, and thus Perl&#39;s exit code.</p>

<p>The intent is to squeeze as much possible information about the likely cause into the limited space of the system exit code. However, as <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$!"><code>$!</code></a> is the value of C&#39;s <code>errno</code>, which can be set by any system call, this means that the value of the exit code used by <a href="CORE.html#die-LIST"><code>die</code></a> can be non-predictable, so should not be relied upon, other than to be non-zero.</p>

<p>You can arrange for a callback to be run just before the <a href="CORE.html#die-LIST"><code>die</code></a> does its deed, by setting the <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#%25SIG"><code>$SIG{__DIE__}</code></a> hook. The associated handler is called with the exception as an argument, and can change the exception, if it sees fit, by calling <a href="CORE.html#die-LIST"><code>die</code></a> again. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#%25SIG">&quot;%SIG&quot; in perlvar</a> for details on setting <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#%25SIG"><code>%SIG</code></a> entries, and <a href="CORE.html#eval-EXPR"><code>eval</code></a> for some examples. Although this feature was to be run only right before your program was to exit, this is not currently so: the <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#%25SIG"><code>$SIG{__DIE__}</code></a> hook is currently called even inside <a href="CORE.html#eval-EXPR"><code>eval</code></a>ed blocks/strings! If one wants the hook to do nothing in such situations, put</p>

<pre><code>    die @_ if $^S;</code></pre>

<p>as the first line of the handler (see <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$%5ES">&quot;$^S&quot; in perlvar</a>). Because this promotes strange action at a distance, this counterintuitive behavior may be fixed in a future release.</p>

<p>See also <a href="CORE.html#exit-EXPR"><code>exit</code></a>, <a href="CORE.html#warn-LIST"><code>warn</code></a>, and the <a href="https://metacpan.org/pod/Carp">Carp</a> module.</p>

</dd>
<dt id="do-BLOCK"><a id="do"></a>do BLOCK  </dt>
<dd>

<p>Not really a function. Returns the value of the last command in the sequence of commands indicated by BLOCK. When modified by the <code>while</code> or <code>until</code> loop modifier, executes the BLOCK once before testing the loop condition. (On other statements the loop modifiers test the conditional first.)</p>

<p><code>do BLOCK</code> does <i>not</i> count as a loop, so the loop control statements <a href="CORE.html#next-LABEL"><code>next</code></a>, <a href="CORE.html#last-LABEL"><code>last</code></a>, or <a href="CORE.html#redo-LABEL"><code>redo</code></a> cannot be used to leave or restart the block. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlsyn.pod">perlsyn</a> for alternative strategies.</p>

</dd>
<dt id="do-EXPR"><a id="do1"></a>do EXPR </dt>
<dd>

<p>Uses the value of EXPR as a filename and executes the contents of the file as a Perl script:</p>

<pre><code>    # load the exact specified file (./ and ../ special-cased)
    do &#39;/foo/stat.pl&#39;;
    do &#39;./stat.pl&#39;;
    do &#39;../foo/stat.pl&#39;;

    # search for the named file within @INC
    do &#39;stat.pl&#39;;
    do &#39;foo/stat.pl&#39;;</code></pre>

<p><code>do &#39;./stat.pl&#39;</code> is largely like</p>

<pre><code>    eval `cat stat.pl`;</code></pre>

<p>except that it&#39;s more concise, runs no external processes, and keeps track of the current filename for error messages. It also differs in that code evaluated with <code>do FILE</code> cannot see lexicals in the enclosing scope; <code>eval STRING</code> does. It&#39;s the same, however, in that it does reparse the file every time you call it, so you probably don&#39;t want to do this inside a loop.</p>

<p>Using <code>do</code> with a relative path (except for <i>./</i> and <i>../</i>), like</p>

<pre><code>    do &#39;foo/stat.pl&#39;;</code></pre>

<p>will search the <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#@INC"><code>@INC</code></a> directories, and update <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#%25INC"><code>%INC</code></a> if the file is found. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#@INC">&quot;@INC&quot; in perlvar</a> and <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#%25INC">&quot;%INC&quot; in perlvar</a> for these variables. In particular, note that whilst historically <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#@INC"><code>@INC</code></a> contained &#39;.&#39; (the current directory) making these two cases equivalent, that is no longer necessarily the case, as &#39;.&#39; is not included in <code>@INC</code> by default in perl versions 5.26.0 onwards. Instead, perl will now warn:</p>

<pre><code>    do &quot;stat.pl&quot; failed, &#39;.&#39; is no longer in @INC;
    did you mean do &quot;./stat.pl&quot;?</code></pre>

<p>If <a href="CORE.html#do-EXPR"><code>do</code></a> can read the file but cannot compile it, it returns <a href="CORE.html#undef-EXPR"><code>undef</code></a> and sets an error message in <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$@"><code>$@</code></a>. If <a href="CORE.html#do-EXPR"><code>do</code></a> cannot read the file, it returns undef and sets <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$!"><code>$!</code></a> to the error. Always check <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$@"><code>$@</code></a> first, as compilation could fail in a way that also sets <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$!"><code>$!</code></a>. If the file is successfully compiled, <a href="CORE.html#do-EXPR"><code>do</code></a> returns the value of the last expression evaluated.</p>

<p>Inclusion of library modules is better done with the <a href="CORE.html#use-Module-VERSION-LIST"><code>use</code></a> and <a href="CORE.html#require-VERSION"><code>require</code></a> operators, which also do automatic error checking and raise an exception if there&#39;s a problem.</p>

<p>You might like to use <a href="CORE.html#do-EXPR"><code>do</code></a> to read in a program configuration file. Manual error checking can be done this way:</p>

<pre><code>    # Read in config files: system first, then user.
    # Beware of using relative pathnames here.
    for $file (&quot;/share/prog/defaults.rc&quot;,
               &quot;$ENV{HOME}/.someprogrc&quot;)
    {
        unless ($return = do $file) {
            warn &quot;couldn&#39;t parse $file: $@&quot; if $@;
            warn &quot;couldn&#39;t do $file: $!&quot;    unless defined $return;
            warn &quot;couldn&#39;t run $file&quot;       unless $return;
        }
    }</code></pre>

</dd>
<dt id="dump-LABEL"><a id="dump"></a>dump LABEL   </dt>
<dd>

</dd>
<dt id="dump-EXPR"><a id="dump1"></a>dump EXPR</dt>
<dd>

</dd>
<dt id="dump2">dump</dt>
<dd>

<p>This function causes an immediate core dump. See also the <b>-u</b> command-line switch in <a href="https://metacpan.org/pod/distribution/perl/pod/perlrun.pod#-u">perlrun</a>, which does the same thing. Primarily this is so that you can use the <b>undump</b> program (not supplied) to turn your core dump into an executable binary after having initialized all your variables at the beginning of the program. When the new binary is executed it will begin by executing a <code>goto LABEL</code> (with all the restrictions that <a href="CORE.html#goto-LABEL"><code>goto</code></a> suffers). Think of it as a goto with an intervening core dump and reincarnation. If <code>LABEL</code> is omitted, restarts the program from the top. The <code>dump EXPR</code> form, available starting in Perl 5.18.0, allows a name to be computed at run time, being otherwise identical to <code>dump LABEL</code>.</p>

<p><b>WARNING</b>: Any files opened at the time of the dump will <i>not</i> be open any more when the program is reincarnated, with possible resulting confusion by Perl.</p>

<p>This function is now largely obsolete, mostly because it&#39;s very hard to convert a core file into an executable. As of Perl 5.30, it must be invoked as <code>CORE::dump()</code>.</p>

<p>Unlike most named operators, this has the same precedence as assignment. It is also exempt from the looks-like-a-function rule, so <code>dump (&quot;foo&quot;).&quot;bar&quot;</code> will cause &quot;bar&quot; to be part of the argument to <a href="CORE.html#dump-LABEL"><code>dump</code></a>.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#dump">&quot;dump&quot; in perlport</a>.</p>

</dd>
<dt id="each-HASH"><a id="each"></a>each HASH  </dt>
<dd>

</dd>
<dt id="each-ARRAY"><a id="each1"></a>each ARRAY </dt>
<dd>

<p>When called on a hash in list context, returns a 2-element list consisting of the key and value for the next element of a hash. In Perl 5.12 and later only, it will also return the index and value for the next element of an array so that you can iterate over it; older Perls consider this a syntax error. When called in scalar context, returns only the key (not the value) in a hash, or the index in an array.</p>

<p>Hash entries are returned in an apparently random order. The actual random order is specific to a given hash; the exact same series of operations on two hashes may result in a different order for each hash. Any insertion into the hash may change the order, as will any deletion, with the exception that the most recent key returned by <a href="CORE.html#each-HASH"><code>each</code></a> or <a href="CORE.html#keys-HASH"><code>keys</code></a> may be deleted without changing the order. So long as a given hash is unmodified you may rely on <a href="CORE.html#keys-HASH"><code>keys</code></a>, <a href="CORE.html#values-HASH"><code>values</code></a> and <a href="CORE.html#each-HASH"><code>each</code></a> to repeatedly return the same order as each other. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlsec.pod#Algorithmic-Complexity-Attacks">&quot;Algorithmic Complexity Attacks&quot; in perlsec</a> for details on why hash order is randomized. Aside from the guarantees provided here the exact details of Perl&#39;s hash algorithm and the hash traversal order are subject to change in any release of Perl.</p>

<p>After <a href="CORE.html#each-HASH"><code>each</code></a> has returned all entries from the hash or array, the next call to <a href="CORE.html#each-HASH"><code>each</code></a> returns the empty list in list context and <a href="CORE.html#undef-EXPR"><code>undef</code></a> in scalar context; the next call following <i>that</i> one restarts iteration. Each hash or array has its own internal iterator, accessed by <a href="CORE.html#each-HASH"><code>each</code></a>, <a href="CORE.html#keys-HASH"><code>keys</code></a>, and <a href="CORE.html#values-HASH"><code>values</code></a>. The iterator is implicitly reset when <a href="CORE.html#each-HASH"><code>each</code></a> has reached the end as just described; it can be explicitly reset by calling <a href="CORE.html#keys-HASH"><code>keys</code></a> or <a href="CORE.html#values-HASH"><code>values</code></a> on the hash or array, or by referencing the hash (but not array) in list context. If you add or delete a hash&#39;s elements while iterating over it, the effect on the iterator is unspecified; for example, entries may be skipped or duplicated--so don&#39;t do that. Exception: It is always safe to delete the item most recently returned by <a href="CORE.html#each-HASH"><code>each</code></a>, so the following code works properly:</p>

<pre><code>    while (my ($key, $value) = each %hash) {
        print $key, &quot;\n&quot;;
        delete $hash{$key};   # This is safe
    }</code></pre>

<p>Tied hashes may have a different ordering behaviour to perl&#39;s hash implementation.</p>

<p>The iterator used by <code>each</code> is attached to the hash or array, and is shared between all iteration operations applied to the same hash or array. Thus all uses of <code>each</code> on a single hash or array advance the same iterator location. All uses of <code>each</code> are also subject to having the iterator reset by any use of <code>keys</code> or <code>values</code> on the same hash or array, or by the hash (but not array) being referenced in list context. This makes <code>each</code>-based loops quite fragile: it is easy to arrive at such a loop with the iterator already part way through the object, or to accidentally clobber the iterator state during execution of the loop body. It&#39;s easy enough to explicitly reset the iterator before starting a loop, but there is no way to insulate the iterator state used by a loop from the iterator state used by anything else that might execute during the loop body. To avoid these problems, use a <code>foreach</code> loop rather than <code>while</code>-<code>each</code>.</p>

<p>This extends to using <code>each</code> on the result of an anonymous hash or array constructor. A new underlying array or hash is created each time so each will always start iterating from scratch, eg:</p>

<pre><code>  # loops forever
  while (my ($key, $value) = each @{ +{ a =&gt; 1 } }) {
      print &quot;$key=$value\n&quot;;
  }</code></pre>

<p>This prints out your environment like the <a href="http://man.he.net/man1/printenv">printenv(1)</a> program, but in a different order:</p>

<pre><code>    while (my ($key,$value) = each %ENV) {
        print &quot;$key=$value\n&quot;;
    }</code></pre>

<p>Starting with Perl 5.14, an experimental feature allowed <a href="CORE.html#each-HASH"><code>each</code></a> to take a scalar expression. This experiment has been deemed unsuccessful, and was removed as of Perl 5.24.</p>

<p>As of Perl 5.18 you can use a bare <a href="CORE.html#each-HASH"><code>each</code></a> in a <code>while</code> loop, which will set <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a> on every iteration. If either an <code>each</code> expression or an explicit assignment of an <code>each</code> expression to a scalar is used as a <code>while</code>/<code>for</code> condition, then the condition actually tests for definedness of the expression&#39;s value, not for its regular truth value.</p>

<pre><code>    while (each %ENV) {
        print &quot;$_=$ENV{$_}\n&quot;;
    }</code></pre>

<p>To avoid confusing would-be users of your code who are running earlier versions of Perl with mysterious syntax errors, put this sort of thing at the top of your file to signal that your code will work <i>only</i> on Perls of a recent vintage:</p>

<pre><code>    use v5.12;  # so keys/values/each work on arrays
    use v5.18;  # so each assigns to $_ in a lone while test</code></pre>

<p>See also <a href="CORE.html#keys-HASH"><code>keys</code></a>, <a href="CORE.html#values-HASH"><code>values</code></a>, and <a href="CORE.html#sort-SUBNAME-LIST"><code>sort</code></a>.</p>

</dd>
<dt id="eof-FILEHANDLE"><a id="eof"></a>eof FILEHANDLE   </dt>
<dd>

</dd>
<dt id="eof-()"><a id="eof1"></a>eof ()</dt>
<dd>

</dd>
<dt id="eof2">eof</dt>
<dd>

<p>Returns 1 if the next read on FILEHANDLE will return end of file <i>or</i> if FILEHANDLE is not open. FILEHANDLE may be an expression whose value gives the real filehandle. (Note that this function actually reads a character and then <code>ungetc</code>s it, so isn&#39;t useful in an interactive context.) Do not read from a terminal file (or call <code>eof(FILEHANDLE)</code> on it) after end-of-file is reached. File types such as terminals may lose the end-of-file condition if you do.</p>

<p>An <a href="CORE.html#eof-FILEHANDLE"><code>eof</code></a> without an argument uses the last file read. Using <a href="CORE.html#eof-FILEHANDLE"><code>eof()</code></a> with empty parentheses is different. It refers to the pseudo file formed from the files listed on the command line and accessed via the <code>&lt;&gt;</code> operator. Since <code>&lt;&gt;</code> isn&#39;t explicitly opened, as a normal filehandle is, an <a href="CORE.html#eof-FILEHANDLE"><code>eof()</code></a> before <code>&lt;&gt;</code> has been used will cause <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#@ARGV"><code>@ARGV</code></a> to be examined to determine if input is available. Similarly, an <a href="CORE.html#eof-FILEHANDLE"><code>eof()</code></a> after <code>&lt;&gt;</code> has returned end-of-file will assume you are processing another <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#@ARGV"><code>@ARGV</code></a> list, and if you haven&#39;t set <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#@ARGV"><code>@ARGV</code></a>, will read input from <code>STDIN</code>; see <a href="https://metacpan.org/pod/distribution/perl/pod/perlop.pod#I/O-Operators">&quot;I/O Operators&quot; in perlop</a>.</p>

<p>In a <code>while (&lt;&gt;)</code> loop, <a href="CORE.html#eof-FILEHANDLE"><code>eof</code></a> or <code>eof(ARGV)</code> can be used to detect the end of each file, whereas <a href="CORE.html#eof-FILEHANDLE"><code>eof()</code></a> will detect the end of the very last file only. Examples:</p>

<pre><code>    # reset line numbering on each input file
    while (&lt;&gt;) {
        next if /^\s*#/;  # skip comments
        print &quot;$.\t$_&quot;;
    } continue {
        close ARGV if eof;  # Not eof()!
    }

    # insert dashes just before last line of last file
    while (&lt;&gt;) {
        if (eof()) {  # check for end of last file
            print &quot;--------------\n&quot;;
        }
        print;
        last if eof();     # needed if we&#39;re reading from a terminal
    }</code></pre>

<p>Practical hint: you almost never need to use <a href="CORE.html#eof-FILEHANDLE"><code>eof</code></a> in Perl, because the input operators typically return <a href="CORE.html#undef-EXPR"><code>undef</code></a> when they run out of data or encounter an error.</p>

</dd>
<dt id="eval-EXPR"><a id="eval"></a>eval EXPR        </dt>
<dd>

</dd>
<dt id="eval-BLOCK"><a id="eval1"></a>eval BLOCK</dt>
<dd>

</dd>
<dt id="eval2">eval</dt>
<dd>

<p><code>eval</code> in all its forms is used to execute a little Perl program, trapping any errors encountered so they don&#39;t crash the calling program.</p>

<p>Plain <code>eval</code> with no argument is just <code>eval EXPR</code>, where the expression is understood to be contained in <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a>. Thus there are only two real <code>eval</code> forms; the one with an EXPR is often called &quot;string eval&quot;. In a string eval, the value of the expression (which is itself determined within scalar context) is first parsed, and if there were no errors, executed as a block within the lexical context of the current Perl program. This form is typically used to delay parsing and subsequent execution of the text of EXPR until run time. Note that the value is parsed every time the <code>eval</code> executes.</p>

<p>The other form is called &quot;block eval&quot;. It is less general than string eval, but the code within the BLOCK is parsed only once (at the same time the code surrounding the <code>eval</code> itself was parsed) and executed within the context of the current Perl program. This form is typically used to trap exceptions more efficiently than the first, while also providing the benefit of checking the code within BLOCK at compile time. BLOCK is parsed and compiled just once. Since errors are trapped, it often is used to check if a given feature is available.</p>

<p>In both forms, the value returned is the value of the last expression evaluated inside the mini-program; a return statement may also be used, just as with subroutines. The expression providing the return value is evaluated in void, scalar, or list context, depending on the context of the <code>eval</code> itself. See <a href="CORE.html#wantarray"><code>wantarray</code></a> for more on how the evaluation context can be determined.</p>

<p>If there is a syntax error or runtime error, or a <a href="CORE.html#die-LIST"><code>die</code></a> statement is executed, <code>eval</code> returns <a href="CORE.html#undef-EXPR"><code>undef</code></a> in scalar context, or an empty list in list context, and <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$@"><code>$@</code></a> is set to the error message. (Prior to 5.16, a bug caused <a href="CORE.html#undef-EXPR"><code>undef</code></a> to be returned in list context for syntax errors, but not for runtime errors.) If there was no error, <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$@"><code>$@</code></a> is set to the empty string. A control flow operator like <a href="CORE.html#last-LABEL"><code>last</code></a> or <a href="CORE.html#goto-LABEL"><code>goto</code></a> can bypass the setting of <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$@"><code>$@</code></a>. Beware that using <code>eval</code> neither silences Perl from printing warnings to STDERR, nor does it stuff the text of warning messages into <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$@"><code>$@</code></a>. To do either of those, you have to use the <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#%25SIG"><code>$SIG{__WARN__}</code></a> facility, or turn off warnings inside the BLOCK or EXPR using <span style="white-space: nowrap;"><code>no warnings &#39;all&#39;</code></span>. See <a href="CORE.html#warn-LIST"><code>warn</code></a>, <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod">perlvar</a>, and <a href="https://metacpan.org/pod/warnings">warnings</a>.</p>

<p>Note that, because <code>eval</code> traps otherwise-fatal errors, it is useful for determining whether a particular feature (such as <a href="CORE.html#socket-SOCKET,DOMAIN,TYPE,PROTOCOL"><code>socket</code></a> or <a href="CORE.html#symlink-OLDFILE,NEWFILE"><code>symlink</code></a>) is implemented. It is also Perl&#39;s exception-trapping mechanism, where the <a href="CORE.html#die-LIST"><code>die</code></a> operator is used to raise exceptions.</p>

<p>Before Perl 5.14, the assignment to <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$@"><code>$@</code></a> occurred before restoration of localized variables, which means that for your code to run on older versions, a temporary is required if you want to mask some, but not all errors:</p>

<pre><code> # alter $@ on nefarious repugnancy only
 {
    my $e;
    {
      local $@; # protect existing $@
      eval { test_repugnancy() };
      # $@ =~ /nefarious/ and die $@; # Perl 5.14 and higher only
      $@ =~ /nefarious/ and $e = $@;
    }
    die $e if defined $e
 }</code></pre>

<p>There are some different considerations for each form:</p>

<dl>

<dt id="String-eval"><a id="String"></a>String eval</dt>
<dd>

<p>Since the return value of EXPR is executed as a block within the lexical context of the current Perl program, any outer lexical variables are visible to it, and any package variable settings or subroutine and format definitions remain afterwards.</p>

<p>Note that when <code>BEGIN {}</code> blocks are embedded inside of an eval block the contents of the block will be executed immediately and before the rest of the eval code is executed. You can disable this entirely by</p>

<pre><code>   local ${^MAX_NESTED_EVAL_BEGIN_BLOCKS} = 0;
   eval $string;</code></pre>

<p>which will cause any embedded <code>BEGIN</code> blocks in <code>$string</code> to throw an exception.</p>

<dl>

<dt id="Under-the-&quot;unicode_eval&quot;-feature"><a id="Under"></a><a id="Under-the--unicode_eval--feature"></a>Under the <a href="https://metacpan.org/pod/feature#The-&#39;unicode_eval&#39;-and-&#39;evalbytes&#39;-features"><code>&quot;unicode_eval&quot;</code> feature</a></dt>
<dd>

<p>If this feature is enabled (which is the default under a <code>use 5.16</code> or higher declaration), Perl assumes that EXPR is a character string. Any <span style="white-space: nowrap;"><code>use utf8</code></span> or <span style="white-space: nowrap;"><code>no utf8</code></span> declarations within the string thus have no effect. Source filters are forbidden as well. (<code>unicode_strings</code>, however, can appear within the string.)</p>

<p>See also the <a href="CORE.html#evalbytes-EXPR"><code>evalbytes</code></a> operator, which works properly with source filters.</p>

</dd>
<dt id="Outside-the-&quot;unicode_eval&quot;-feature"><a id="Outside"></a><a id="Outside-the--unicode_eval--feature"></a>Outside the <code>&quot;unicode_eval&quot;</code> feature</dt>
<dd>

<p>In this case, the behavior is problematic and is not so easily described. Here are two bugs that cannot easily be fixed without breaking existing programs:</p>

<ul>

<li><p>Perl&#39;s internal storage of EXPR affects the behavior of the executed code. For example:</p>

<pre><code>    my $v = eval &quot;use utf8; &#39;$expr&#39;&quot;;</code></pre>

<p>If $expr is <code>&quot;\xc4\x80&quot;</code> (U+0100 in UTF-8), then the value stored in <code>$v</code> will depend on whether Perl stores $expr &quot;upgraded&quot; (cf. <a href="https://metacpan.org/pod/utf8">utf8</a>) or not:</p>

<ul>

<li><p>If upgraded, <code>$v</code> will be <code>&quot;\xc4\x80&quot;</code> (i.e., the <code>use utf8</code> has no effect.)</p>

</li>
<li><p>If non-upgraded, <code>$v</code> will be <code>&quot;\x{100}&quot;</code>.</p>

</li>
</ul>

<p>This is undesirable since being upgraded or not should not affect a string&#39;s behavior.</p>

</li>
<li><p>Source filters activated within <code>eval</code> leak out into whichever file scope is currently being compiled. To give an example with the CPAN module <a href="../Semi::Semicolons.html">Semi::Semicolons</a>:</p>

<pre><code> BEGIN { eval &quot;use Semi::Semicolons; # not filtered&quot; }
 # filtered here!</code></pre>

<p><a href="CORE.html#evalbytes-EXPR"><code>evalbytes</code></a> fixes that to work the way one would expect:</p>

<pre><code> use feature &quot;evalbytes&quot;;
 BEGIN { evalbytes &quot;use Semi::Semicolons; # filtered&quot; }
 # not filtered</code></pre>

</li>
</ul>

</dd>
</dl>

<p>Problems can arise if the string expands a scalar containing a floating point number. That scalar can expand to letters, such as <code>&quot;NaN&quot;</code> or <code>&quot;Infinity&quot;</code>; or, within the scope of a <a href="https://metacpan.org/pod/locale"><code>use locale</code></a>, the decimal point character may be something other than a dot (such as a comma). None of these are likely to parse as you are likely expecting.</p>

<p>You should be especially careful to remember what&#39;s being looked at when:</p>

<pre><code>    eval $x;        # CASE 1
    eval &quot;$x&quot;;      # CASE 2

    eval &#39;$x&#39;;      # CASE 3
    eval { $x };    # CASE 4

    eval &quot;\$$x++&quot;;  # CASE 5
    $$x++;          # CASE 6</code></pre>

<p>Cases 1 and 2 above behave identically: they run the code contained in the variable $x. (Although case 2 has misleading double quotes making the reader wonder what else might be happening (nothing is).) Cases 3 and 4 likewise behave in the same way: they run the code <code>&#39;$x&#39;</code>, which does nothing but return the value of $x. (Case 4 is preferred for purely visual reasons, but it also has the advantage of compiling at compile-time instead of at run-time.) Case 5 is a place where normally you <i>would</i> like to use double quotes, except that in this particular situation, you can just use symbolic references instead, as in case 6.</p>

<p>An <code>eval &#39;&#39;</code> executed within a subroutine defined in the <code>DB</code> package doesn&#39;t see the usual surrounding lexical scope, but rather the scope of the first non-DB piece of code that called it. You don&#39;t normally need to worry about this unless you are writing a Perl debugger.</p>

<p>The final semicolon, if any, may be omitted from the value of EXPR.</p>

</dd>
<dt id="Block-eval"><a id="Block"></a>Block eval</dt>
<dd>

<p>If the code to be executed doesn&#39;t vary, you may use the eval-BLOCK form to trap run-time errors without incurring the penalty of recompiling each time. The error, if any, is still returned in <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$@"><code>$@</code></a>. Examples:</p>

<pre><code>    # make divide-by-zero nonfatal
    eval { $answer = $a / $b; }; warn $@ if $@;

    # same thing, but less efficient
    eval &#39;$answer = $a / $b&#39;; warn $@ if $@;

    # a compile-time error
    eval { $answer = }; # WRONG

    # a run-time error
    eval &#39;$answer =&#39;;   # sets $@</code></pre>

<p>If you want to trap errors when loading an XS module, some problems with the binary interface (such as Perl version skew) may be fatal even with <code>eval</code> unless <code>$ENV{PERL_DL_NONLAZY}</code> is set. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlrun.pod#PERL_DL_NONLAZY">perlrun</a>.</p>

<p>Using the <code>eval {}</code> form as an exception trap in libraries does have some issues. Due to the current arguably broken state of <code>__DIE__</code> hooks, you may wish not to trigger any <code>__DIE__</code> hooks that user code may have installed. You can use the <code>local $SIG{__DIE__}</code> construct for this purpose, as this example shows:</p>

<pre><code>    # a private exception trap for divide-by-zero
    eval { local $SIG{&#39;__DIE__&#39;}; $answer = $a / $b; };
    warn $@ if $@;</code></pre>

<p>This is especially significant, given that <code>__DIE__</code> hooks can call <a href="CORE.html#die-LIST"><code>die</code></a> again, which has the effect of changing their error messages:</p>

<pre><code>    # __DIE__ hooks may modify error messages
    {
       local $SIG{&#39;__DIE__&#39;} =
              sub { (my $x = $_[0]) =~ s/foo/bar/g; die $x };
       eval { die &quot;foo lives here&quot; };
       print $@ if $@;                # prints &quot;bar lives here&quot;
    }</code></pre>

<p>Because this promotes action at a distance, this counterintuitive behavior may be fixed in a future release.</p>

<p><code>eval BLOCK</code> does <i>not</i> count as a loop, so the loop control statements <a href="CORE.html#next-LABEL"><code>next</code></a>, <a href="CORE.html#last-LABEL"><code>last</code></a>, or <a href="CORE.html#redo-LABEL"><code>redo</code></a> cannot be used to leave or restart the block.</p>

<p>The final semicolon, if any, may be omitted from within the BLOCK.</p>

</dd>
</dl>

</dd>
<dt id="evalbytes-EXPR"><a id="evalbytes"></a>evalbytes EXPR </dt>
<dd>

</dd>
<dt id="evalbytes1">evalbytes</dt>
<dd>

<p>This function is similar to a <a href="CORE.html#eval-EXPR">string eval</a>, except it always parses its argument (or <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a> if EXPR is omitted) as a byte string. If the string contains any code points above 255, then it cannot be a byte string, and the <code>evalbytes</code> will fail with the error stored in <code>$@</code>.</p>

<p><code>use utf8</code> and <code>no utf8</code> within the string have their usual effect.</p>

<p>Source filters activated within the evaluated code apply to the code itself.</p>

<p><a href="CORE.html#evalbytes-EXPR"><code>evalbytes</code></a> is available starting in Perl v5.16. To access it, you must say <code>CORE::evalbytes</code>, but you can omit the <code>CORE::</code> if the <a href="https://metacpan.org/pod/feature#The-&#39;unicode_eval&#39;-and-&#39;evalbytes&#39;-features"><code>&quot;evalbytes&quot;</code> feature</a> is enabled. This is enabled automatically with a <code>use v5.16</code> (or higher) declaration in the current scope.</p>

</dd>
<dt id="exec-LIST"><a id="exec"></a>exec LIST  </dt>
<dd>

</dd>
<dt id="exec-PROGRAM-LIST"><a id="exec1"></a>exec PROGRAM LIST</dt>
<dd>

<p>The <a href="CORE.html#exec-LIST"><code>exec</code></a> function executes a system command <i>and never returns</i>; use <a href="CORE.html#system-LIST"><code>system</code></a> instead of <a href="CORE.html#exec-LIST"><code>exec</code></a> if you want it to return. It fails and returns false only if the command does not exist <i>and</i> it is executed directly instead of via your system&#39;s command shell (see below).</p>

<p>Since it&#39;s a common mistake to use <a href="CORE.html#exec-LIST"><code>exec</code></a> instead of <a href="CORE.html#system-LIST"><code>system</code></a>, Perl warns you if <a href="CORE.html#exec-LIST"><code>exec</code></a> is called in void context and if there is a following statement that isn&#39;t <a href="CORE.html#die-LIST"><code>die</code></a>, <a href="CORE.html#warn-LIST"><code>warn</code></a>, or <a href="CORE.html#exit-EXPR"><code>exit</code></a> (if <a href="https://metacpan.org/pod/warnings">warnings</a> are enabled--but you always do that, right?). If you <i>really</i> want to follow an <a href="CORE.html#exec-LIST"><code>exec</code></a> with some other statement, you can use one of these styles to avoid the warning:</p>

<pre><code>    exec (&#39;foo&#39;)   or print STDERR &quot;couldn&#39;t exec foo: $!&quot;;
    { exec (&#39;foo&#39;) }; print STDERR &quot;couldn&#39;t exec foo: $!&quot;;</code></pre>

<p>If there is more than one argument in LIST, this calls <a href="http://man.he.net/man3/execvp">execvp(3)</a> with the arguments in LIST. If there is only one element in LIST, the argument is checked for shell metacharacters, and if there are any, the entire argument is passed to the system&#39;s command shell for parsing (this is <code>/bin/sh -c</code> on Unix platforms, but varies on other platforms). If there are no shell metacharacters in the argument, it is split into words and passed directly to <code>execvp</code>, which is more efficient. Examples:</p>

<pre><code>    exec &#39;/bin/echo&#39;, &#39;Your arguments are: &#39;, @ARGV;
    exec &quot;sort $outfile | uniq&quot;;</code></pre>

<p>If you don&#39;t really want to execute the first argument, but want to lie to the program you are executing about its own name, you can specify the program you actually want to run as an &quot;indirect object&quot; (without a comma) in front of the LIST, as in <code>exec PROGRAM LIST</code>. (This always forces interpretation of the LIST as a multivalued list, even if there is only a single scalar in the list.) Example:</p>

<pre><code>    my $shell = &#39;/bin/csh&#39;;
    exec $shell &#39;-sh&#39;;    # pretend it&#39;s a login shell</code></pre>

<p>or, more directly,</p>

<pre><code>    exec {&#39;/bin/csh&#39;} &#39;-sh&#39;;  # pretend it&#39;s a login shell</code></pre>

<p>When the arguments get executed via the system shell, results are subject to its quirks and capabilities. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlop.pod#%60STRING%60">&quot;`STRING`&quot; in perlop</a> for details.</p>

<p>Using an indirect object with <a href="CORE.html#exec-LIST"><code>exec</code></a> or <a href="CORE.html#system-LIST"><code>system</code></a> is also more secure. This usage (which also works fine with <a href="CORE.html#system-LIST"><code>system</code></a>) forces interpretation of the arguments as a multivalued list, even if the list had just one argument. That way you&#39;re safe from the shell expanding wildcards or splitting up words with whitespace in them.</p>

<pre><code>    my @args = ( &quot;echo surprise&quot; );

    exec @args;               # subject to shell escapes
                                # if @args == 1
    exec { $args[0] } @args;  # safe even with one-arg list</code></pre>

<p>The first version, the one without the indirect object, ran the <i>echo</i> program, passing it <code>&quot;surprise&quot;</code> an argument. The second version didn&#39;t; it tried to run a program named <i>&quot;echo surprise&quot;</i>, didn&#39;t find it, and set <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$?"><code>$?</code></a> to a non-zero value indicating failure.</p>

<p>On Windows, only the <code>exec PROGRAM LIST</code> indirect object syntax will reliably avoid using the shell; <code>exec LIST</code>, even with more than one element, will fall back to the shell if the first spawn fails.</p>

<p>Perl attempts to flush all files opened for output before the exec, but this may not be supported on some platforms (see <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod">perlport</a>). To be safe, you may need to set <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$%7C"><code>$|</code></a> (<code>$AUTOFLUSH</code> in <a href="https://metacpan.org/pod/English">English</a>) or call the <code>autoflush</code> method of <a href="https://metacpan.org/pod/IO::Handle#METHODS"><code>IO::Handle</code></a> on any open handles to avoid lost output.</p>

<p>Note that <a href="CORE.html#exec-LIST"><code>exec</code></a> will not call your <code>END</code> blocks, nor will it invoke <code>DESTROY</code> methods on your objects.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#exec">&quot;exec&quot; in perlport</a>.</p>

</dd>
<dt id="exists-EXPR"><a id="exists"></a>exists EXPR  </dt>
<dd>

<p>Given an expression that specifies an element of a hash, returns true if the specified element in the hash has ever been initialized, even if the corresponding value is undefined.</p>

<pre><code>    print &quot;Exists\n&quot;    if exists $hash{$key};
    print &quot;Defined\n&quot;   if defined $hash{$key};
    print &quot;True\n&quot;      if $hash{$key};</code></pre>

<p>exists may also be called on array elements, but its behavior is much less obvious and is strongly tied to the use of <a href="CORE.html#delete-EXPR"><code>delete</code></a> on arrays.</p>

<p><b>WARNING:</b> Calling <a href="CORE.html#exists-EXPR"><code>exists</code></a> on array values is strongly discouraged. The notion of deleting or checking the existence of Perl array elements is not conceptually coherent, and can lead to surprising behavior.</p>

<pre><code>    print &quot;Exists\n&quot;    if exists $array[$index];
    print &quot;Defined\n&quot;   if defined $array[$index];
    print &quot;True\n&quot;      if $array[$index];</code></pre>

<p>A hash or array element can be true only if it&#39;s defined and defined only if it exists, but the reverse doesn&#39;t necessarily hold true.</p>

<p>Given an expression that specifies the name of a subroutine, returns true if the specified subroutine has ever been declared, even if it is undefined. Mentioning a subroutine name for exists or defined does not count as declaring it. Note that a subroutine that does not exist may still be callable: its package may have an <code>AUTOLOAD</code> method that makes it spring into existence the first time that it is called; see <a href="https://metacpan.org/pod/distribution/perl/pod/perlsub.pod">perlsub</a>.</p>

<pre><code>    print &quot;Exists\n&quot;  if exists &amp;subroutine;
    print &quot;Defined\n&quot; if defined &amp;subroutine;</code></pre>

<p>Note that the EXPR can be arbitrarily complicated as long as the final operation is a hash or array key lookup or subroutine name:</p>

<pre><code>    if (exists $ref-&gt;{A}-&gt;{B}-&gt;{$key})  { }
    if (exists $hash{A}{B}{$key})       { }

    if (exists $ref-&gt;{A}-&gt;{B}-&gt;[$ix])   { }
    if (exists $hash{A}{B}[$ix])        { }

    if (exists &amp;{$ref-&gt;{A}{B}{$key}})   { }</code></pre>

<p>Although the most deeply nested array or hash element will not spring into existence just because its existence was tested, any intervening ones will. Thus <code>$ref-&gt;{&quot;A&quot;}</code> and <code>$ref-&gt;{&quot;A&quot;}-&gt;{&quot;B&quot;}</code> will spring into existence due to the existence test for the <code>$key</code> element above. This happens anywhere the arrow operator is used, including even here:</p>

<pre><code>    undef $ref;
    if (exists $ref-&gt;{&quot;Some key&quot;})    { }
    print $ref;  # prints HASH(0x80d3d5c)</code></pre>

<p>Use of a subroutine call, rather than a subroutine name, as an argument to <a href="CORE.html#exists-EXPR"><code>exists</code></a> is an error.</p>

<pre><code>    exists &amp;sub;    # OK
    exists &amp;sub();  # Error</code></pre>

</dd>
<dt id="exit-EXPR"><a id="exit"></a>exit EXPR   </dt>
<dd>

</dd>
<dt id="exit1">exit</dt>
<dd>

<p>Evaluates EXPR and exits immediately with that value. Example:</p>

<pre><code>    my $ans = &lt;STDIN&gt;;
    exit 0 if $ans =~ /^[Xx]/;</code></pre>

<p>See also <a href="CORE.html#die-LIST"><code>die</code></a>. If EXPR is omitted, exits with <code>0</code> status. The only universally recognized values for EXPR are <code>0</code> for success and <code>1</code> for error; other values are subject to interpretation depending on the environment in which the Perl program is running. For example, exiting 69 (EX_UNAVAILABLE) from a <i>sendmail</i> incoming-mail filter will cause the mailer to return the item undelivered, but that&#39;s not true everywhere.</p>

<p>Don&#39;t use <a href="CORE.html#exit-EXPR"><code>exit</code></a> to abort a subroutine if there&#39;s any chance that someone might want to trap whatever error happened. Use <a href="CORE.html#die-LIST"><code>die</code></a> instead, which can be trapped by an <a href="CORE.html#eval-EXPR"><code>eval</code></a>.</p>

<p>The <a href="CORE.html#exit-EXPR"><code>exit</code></a> function does not always exit immediately. It calls any defined <code>END</code> routines first, but these <code>END</code> routines may not themselves abort the exit. Likewise any object destructors that need to be called are called before the real exit. <code>END</code> routines and destructors can change the exit status by modifying <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$?"><code>$?</code></a>. If this is a problem, you can call <a href="https://metacpan.org/pod/distribution/perl/ext/POSIX/lib/POSIX.pod#_exit"><code>POSIX::_exit($status)</code></a> to avoid <code>END</code> and destructor processing. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlmod.pod">perlmod</a> for details.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#exit">&quot;exit&quot; in perlport</a>.</p>

</dd>
<dt id="exp-EXPR"><a id="exp"></a>exp EXPR     </dt>
<dd>

</dd>
<dt id="exp1">exp</dt>
<dd>

<p>Returns <i>e</i> (the natural logarithm base) to the power of EXPR. If EXPR is omitted, gives <code>exp($_)</code>.</p>

</dd>
<dt id="fc-EXPR"><a id="fc"></a>fc EXPR     </dt>
<dd>

</dd>
<dt id="fc1">fc</dt>
<dd>

<p>Returns the casefolded version of EXPR. This is the internal function implementing the <code>\F</code> escape in double-quoted strings.</p>

<p>Casefolding is the process of mapping strings to a form where case differences are erased; comparing two strings in their casefolded form is effectively a way of asking if two strings are equal, regardless of case.</p>

<p>Roughly, if you ever found yourself writing this</p>

<pre><code>    lc($this) eq lc($that)    # Wrong!
        # or
    uc($this) eq uc($that)    # Also wrong!
        # or
    $this =~ /^\Q$that\E\z/i  # Right!</code></pre>

<p>Now you can write</p>

<pre><code>    fc($this) eq fc($that)</code></pre>

<p>And get the correct results.</p>

<p>Perl only implements the full form of casefolding, but you can access the simple folds using <a href="https://metacpan.org/pod/Unicode::UCD#casefold()">&quot;<b>casefold()</b>&quot; in Unicode::UCD</a> and <a href="https://metacpan.org/pod/Unicode::UCD#prop_invmap()">&quot;<b>prop_invmap()</b>&quot; in Unicode::UCD</a>. For further information on casefolding, refer to the Unicode Standard, specifically sections 3.13 <code>Default Case Operations</code>, 4.2 <code>Case-Normative</code>, and 5.18 <code>Case Mappings</code>, available at <a href="https://www.unicode.org/versions/latest/">https://www.unicode.org/versions/latest/</a>, as well as the Case Charts available at <a href="https://www.unicode.org/charts/case/">https://www.unicode.org/charts/case/</a>.</p>

<p>If EXPR is omitted, uses <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a>.</p>

<p>This function behaves the same way under various pragmas, such as within <a href="https://metacpan.org/pod/feature#The-&#39;unicode_strings&#39;-feature"><span style="white-space: nowrap;"><code>&quot;use feature &#39;unicode_strings&quot;</code></span></a>, as <a href="CORE.html#lc-EXPR"><code>lc</code></a> does, with the single exception of <a href="CORE.html#fc-EXPR"><code>fc</code></a> of <i>LATIN CAPITAL LETTER SHARP S</i> (U+1E9E) within the scope of <a href="https://metacpan.org/pod/locale"><span style="white-space: nowrap;"><code>use locale</code></span></a>. The foldcase of this character would normally be <code>&quot;ss&quot;</code>, but as explained in the <a href="CORE.html#lc-EXPR"><code>lc</code></a> section, case changes that cross the 255/256 boundary are problematic under locales, and are hence prohibited. Therefore, this function under locale returns instead the string <code>&quot;\x{17F}\x{17F}&quot;</code>, which is the <i>LATIN SMALL LETTER LONG S</i>. Since that character itself folds to <code>&quot;s&quot;</code>, the string of two of them together should be equivalent to a single U+1E9E when foldcased.</p>

<p>While the Unicode Standard defines two additional forms of casefolding, one for Turkic languages and one that never maps one character into multiple characters, these are not provided by the Perl core. However, the CPAN module <a href="../Unicode::Casing.html"><code>Unicode::Casing</code></a> may be used to provide an implementation.</p>

<p><a href="CORE.html#fc-EXPR"><code>fc</code></a> is available only if the <a href="https://metacpan.org/pod/feature#The-&#39;fc&#39;-feature"><code>&quot;fc&quot;</code> feature</a> is enabled or if it is prefixed with <code>CORE::</code>. The <a href="https://metacpan.org/pod/feature#The-&#39;fc&#39;-feature"><code>&quot;fc&quot;</code> feature</a> is enabled automatically with a <code>use v5.16</code> (or higher) declaration in the current scope.</p>

</dd>
<dt id="fcntl-FILEHANDLE,FUNCTION,SCALAR"><a id="fcntl"></a><a id="fcntl-FILEHANDLE-FUNCTION-SCALAR"></a>fcntl FILEHANDLE,FUNCTION,SCALAR </dt>
<dd>

<p>Implements the <a href="http://man.he.net/man2/fcntl">fcntl(2)</a> function. You&#39;ll probably have to say</p>

<pre><code>    use Fcntl;</code></pre>

<p>first to get the correct constant definitions. Argument processing and value returned work just like <a href="CORE.html#ioctl-FILEHANDLE,FUNCTION,SCALAR"><code>ioctl</code></a> below. For example:</p>

<pre><code>    use Fcntl;
    my $flags = fcntl($filehandle, F_GETFL, 0)
        or die &quot;Can&#39;t fcntl F_GETFL: $!&quot;;</code></pre>

<p>You don&#39;t have to check for <a href="CORE.html#defined-EXPR"><code>defined</code></a> on the return from <a href="CORE.html#fcntl-FILEHANDLE,FUNCTION,SCALAR"><code>fcntl</code></a>. Like <a href="CORE.html#ioctl-FILEHANDLE,FUNCTION,SCALAR"><code>ioctl</code></a>, it maps a <code>0</code> return from the system call into <code>&quot;0 but true&quot;</code> in Perl. This string is true in boolean context and <code>0</code> in numeric context. It is also exempt from the normal <a href="https://metacpan.org/pod/distribution/perl/pod/perldiag.pod#Argument-%22%25s%22-isn&#39;t-numeric%25s"><code>Argument &quot;...&quot; isn&#39;t numeric</code></a> <a href="https://metacpan.org/pod/warnings">warnings</a> on improper numeric conversions.</p>

<p>Note that <a href="CORE.html#fcntl-FILEHANDLE,FUNCTION,SCALAR"><code>fcntl</code></a> raises an exception if used on a machine that doesn&#39;t implement <a href="http://man.he.net/man2/fcntl">fcntl(2)</a>. See the <a href="https://metacpan.org/pod/Fcntl">Fcntl</a> module or your <a href="http://man.he.net/man2/fcntl">fcntl(2)</a> manpage to learn what functions are available on your system.</p>

<p>Here&#39;s an example of setting a filehandle named <code>$REMOTE</code> to be non-blocking at the system level. You&#39;ll have to negotiate <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$%7C"><code>$|</code></a> on your own, though.</p>

<pre><code>    use Fcntl qw(F_GETFL F_SETFL O_NONBLOCK);

    my $flags = fcntl($REMOTE, F_GETFL, 0)
        or die &quot;Can&#39;t get flags for the socket: $!\n&quot;;

    fcntl($REMOTE, F_SETFL, $flags | O_NONBLOCK)
        or die &quot;Can&#39;t set flags for the socket: $!\n&quot;;</code></pre>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#fcntl">&quot;fcntl&quot; in perlport</a>.</p>

</dd>
<dt id="__FILE__"><a id="FILE__"></a>__FILE__ </dt>
<dd>

<p>A special token that returns the name of the file in which it occurs. It can be altered by the mechanism described at <a href="https://metacpan.org/pod/distribution/perl/pod/perlsyn.pod#Plain-Old-Comments-(Not!)">&quot;Plain Old Comments (Not!)&quot; in perlsyn</a>.</p>

</dd>
<dt id="field-VARNAME"><a id="field"></a>field VARNAME </dt>
<dd>

<p>Declares a new field variable within the current class. Methods and <code>ADJUST</code> blocks of the class will have access to this variable as if it was a lexical in scope at that point.</p>

</dd>
<dt id="fileno-FILEHANDLE"><a id="fileno"></a>fileno FILEHANDLE </dt>
<dd>

</dd>
<dt id="fileno-DIRHANDLE"><a id="fileno1"></a>fileno DIRHANDLE</dt>
<dd>

<p>Returns the file descriptor for a filehandle or directory handle, or undefined if the filehandle is not open. If there is no real file descriptor at the OS level, as can happen with filehandles connected to memory objects via <a href="CORE.html#open-FILEHANDLE,MODE,EXPR"><code>open</code></a> with a reference for the third argument, -1 is returned.</p>

<p>This is mainly useful for constructing bitmaps for <a href="CORE.html#select-RBITS,WBITS,EBITS,TIMEOUT"><code>select</code></a> and low-level POSIX tty-handling operations. If FILEHANDLE is an expression, the value is taken as an indirect filehandle, generally its name.</p>

<p>You can use this to find out whether two handles refer to the same underlying descriptor:</p>

<pre><code>    if (fileno($this) != -1 &amp;&amp; fileno($this) == fileno($that)) {
        print &quot;\$this and \$that are dups\n&quot;;
    } elsif (fileno($this) != -1 &amp;&amp; fileno($that) != -1) {
        print &quot;\$this and \$that have different &quot; .
            &quot;underlying file descriptors\n&quot;;
    } else {
        print &quot;At least one of \$this and \$that does &quot; .
            &quot;not have a real file descriptor\n&quot;;
    }</code></pre>

<p>The behavior of <a href="CORE.html#fileno-FILEHANDLE"><code>fileno</code></a> on a directory handle depends on the operating system. On a system with <a href="http://man.he.net/man3/dirfd">dirfd(3)</a> or similar, <a href="CORE.html#fileno-FILEHANDLE"><code>fileno</code></a> on a directory handle returns the underlying file descriptor associated with the handle; on systems with no such support, it returns the undefined value, and sets <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$!"><code>$!</code></a> (errno).</p>

</dd>
<dt id="flock-FILEHANDLE,OPERATION"><a id="flock"></a><a id="flock-FILEHANDLE-OPERATION"></a>flock FILEHANDLE,OPERATION   </dt>
<dd>

<p>Calls <a href="http://man.he.net/man2/flock">flock(2)</a>, or an emulation of it, on FILEHANDLE. Returns true for success, false on failure. Produces a fatal error if used on a machine that doesn&#39;t implement <a href="http://man.he.net/man2/flock">flock(2)</a>, <a href="http://man.he.net/man2/fcntl">fcntl(2)</a> locking, or <a href="http://man.he.net/man3/lockf">lockf(3)</a>. <a href="CORE.html#flock-FILEHANDLE,OPERATION"><code>flock</code></a> is Perl&#39;s portable file-locking interface, although it locks entire files only, not records.</p>

<p>Two potentially non-obvious but traditional <a href="CORE.html#flock-FILEHANDLE,OPERATION"><code>flock</code></a> semantics are that it waits indefinitely until the lock is granted, and that its locks are <b>merely advisory</b>. Such discretionary locks are more flexible, but offer fewer guarantees. This means that programs that do not also use <a href="CORE.html#flock-FILEHANDLE,OPERATION"><code>flock</code></a> may modify files locked with <a href="CORE.html#flock-FILEHANDLE,OPERATION"><code>flock</code></a>. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod">perlport</a>, your port&#39;s specific documentation, and your system-specific local manpages for details. It&#39;s best to assume traditional behavior if you&#39;re writing portable programs. (But if you&#39;re not, you should as always feel perfectly free to write for your own system&#39;s idiosyncrasies (sometimes called &quot;features&quot;). Slavish adherence to portability concerns shouldn&#39;t get in the way of your getting your job done.)</p>

<p>OPERATION is one of LOCK_SH, LOCK_EX, or LOCK_UN, possibly combined with LOCK_NB. These constants are traditionally valued 1, 2, 8 and 4, but you can use the symbolic names if you import them from the <a href="https://metacpan.org/pod/Fcntl">Fcntl</a> module, either individually, or as a group using the <code>:flock</code> tag. LOCK_SH requests a shared lock, LOCK_EX requests an exclusive lock, and LOCK_UN releases a previously requested lock. If LOCK_NB is bitwise-or&#39;ed with LOCK_SH or LOCK_EX, then <a href="CORE.html#flock-FILEHANDLE,OPERATION"><code>flock</code></a> returns immediately rather than blocking waiting for the lock; check the return status to see if you got it.</p>

<p>To avoid the possibility of miscoordination, Perl now flushes FILEHANDLE before locking or unlocking it.</p>

<p>Note that the emulation built with <a href="http://man.he.net/man3/lockf">lockf(3)</a> doesn&#39;t provide shared locks, and it requires that FILEHANDLE be open with write intent. These are the semantics that <a href="http://man.he.net/man3/lockf">lockf(3)</a> implements. Most if not all systems implement <a href="http://man.he.net/man3/lockf">lockf(3)</a> in terms of <a href="http://man.he.net/man2/fcntl">fcntl(2)</a> locking, though, so the differing semantics shouldn&#39;t bite too many people.</p>

<p>Note that the <a href="http://man.he.net/man2/fcntl">fcntl(2)</a> emulation of <a href="http://man.he.net/man3/flock">flock(3)</a> requires that FILEHANDLE be open with read intent to use LOCK_SH and requires that it be open with write intent to use LOCK_EX.</p>

<p>Note also that some versions of <a href="CORE.html#flock-FILEHANDLE,OPERATION"><code>flock</code></a> cannot lock things over the network; you would need to use the more system-specific <a href="CORE.html#fcntl-FILEHANDLE,FUNCTION,SCALAR"><code>fcntl</code></a> for that. If you like you can force Perl to ignore your system&#39;s <a href="http://man.he.net/man2/flock">flock(2)</a> function, and so provide its own <a href="http://man.he.net/man2/fcntl">fcntl(2)</a>-based emulation, by passing the switch <code>-Ud_flock</code> to the <i>Configure</i> program when you configure and build a new Perl.</p>

<p>Here&#39;s a mailbox appender for BSD systems.</p>

<pre><code>    # import LOCK_* and SEEK_END constants
    use Fcntl qw(:flock SEEK_END);

    sub lock {
        my ($fh) = @_;
        flock($fh, LOCK_EX) or die &quot;Cannot lock mailbox - $!\n&quot;;
        # and, in case we&#39;re running on a very old UNIX
        # variant without the modern O_APPEND semantics...
        seek($fh, 0, SEEK_END) or die &quot;Cannot seek - $!\n&quot;;
    }

    sub unlock {
        my ($fh) = @_;
        flock($fh, LOCK_UN) or die &quot;Cannot unlock mailbox - $!\n&quot;;
    }

    open(my $mbox, &quot;&gt;&gt;&quot;, &quot;/usr/spool/mail/$ENV{&#39;USER&#39;}&quot;)
        or die &quot;Can&#39;t open mailbox: $!&quot;;

    lock($mbox);
    print $mbox $msg,&quot;\n\n&quot;;
    unlock($mbox);</code></pre>

<p>On systems that support a real <a href="http://man.he.net/man2/flock">flock(2)</a>, locks are inherited across <a href="CORE.html#fork"><code>fork</code></a> calls, whereas those that must resort to the more capricious <a href="http://man.he.net/man2/fcntl">fcntl(2)</a> function lose their locks, making it seriously harder to write servers.</p>

<p>See also <a href="https://metacpan.org/pod/DB_File">DB_File</a> for other <a href="CORE.html#flock-FILEHANDLE,OPERATION"><code>flock</code></a> examples.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#flock">&quot;flock&quot; in perlport</a>.</p>

</dd>
<dt id="fork">fork   </dt>
<dd>

<p>Does a <a href="http://man.he.net/man2/fork">fork(2)</a> system call to create a new process running the same program at the same point. It returns the child pid to the parent process, <code>0</code> to the child process, or <a href="CORE.html#undef-EXPR"><code>undef</code></a> if the fork is unsuccessful. File descriptors (and sometimes locks on those descriptors) are shared, while everything else is copied. On most systems supporting <a href="http://man.he.net/man2/fork">fork(2)</a>, great care has gone into making it extremely efficient (for example, using copy-on-write technology on data pages), making it the dominant paradigm for multitasking over the last few decades.</p>

<p>Perl attempts to flush all files opened for output before forking the child process, but this may not be supported on some platforms (see <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod">perlport</a>). To be safe, you may need to set <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$%7C"><code>$|</code></a> (<code>$AUTOFLUSH</code> in <a href="https://metacpan.org/pod/English">English</a>) or call the <code>autoflush</code> method of <a href="https://metacpan.org/pod/IO::Handle#METHODS"><code>IO::Handle</code></a> on any open handles to avoid duplicate output.</p>

<p>If you <a href="CORE.html#fork"><code>fork</code></a> without ever waiting on your children, you will accumulate zombies. On some systems, you can avoid this by setting <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#%25SIG"><code>$SIG{CHLD}</code></a> to <code>&quot;IGNORE&quot;</code>. See also <a href="https://metacpan.org/pod/distribution/perl/pod/perlipc.pod">perlipc</a> for more examples of forking and reaping moribund children.</p>

<p>Note that if your forked child inherits system file descriptors like STDIN and STDOUT that are actually connected by a pipe or socket, even if you exit, then the remote server (such as, say, a CGI script or a backgrounded job launched from a remote shell) won&#39;t think you&#39;re done. You should reopen those to <i>/dev/null</i> if it&#39;s any issue.</p>

<p>On some platforms such as Windows, where the <a href="http://man.he.net/man2/fork">fork(2)</a> system call is not available, Perl can be built to emulate <a href="CORE.html#fork"><code>fork</code></a> in the Perl interpreter. The emulation is designed, at the level of the Perl program, to be as compatible as possible with the &quot;Unix&quot; <a href="http://man.he.net/man2/fork">fork(2)</a>. However it has limitations that have to be considered in code intended to be portable. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlfork.pod">perlfork</a> for more details.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#fork">&quot;fork&quot; in perlport</a>.</p>

</dd>
<dt id="format">format </dt>
<dd>

<p>Declare a picture format for use by the <a href="CORE.html#write-FILEHANDLE"><code>write</code></a> function. For example:</p>

<pre><code>    format Something =
        Test: @&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; @||||| @&gt;&gt;&gt;&gt;&gt;
              $str,     $%,    &#39;$&#39; . int($num)
    .

    $str = &quot;widget&quot;;
    $num = $cost/$quantity;
    $~ = &#39;Something&#39;;
    write;</code></pre>

<p>See <a href="https://metacpan.org/pod/distribution/perl/pod/perlform.pod">perlform</a> for many details and examples.</p>

</dd>
<dt id="formline-PICTURE,LIST"><a id="formline"></a><a id="formline-PICTURE-LIST"></a>formline PICTURE,LIST </dt>
<dd>

<p>This is an internal function used by <a href="CORE.html#format"><code>format</code></a>s, though you may call it, too. It formats (see <a href="https://metacpan.org/pod/distribution/perl/pod/perlform.pod">perlform</a>) a list of values according to the contents of PICTURE, placing the output into the format output accumulator, <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$%5EA"><code>$^A</code></a> (or <code>$ACCUMULATOR</code> in <a href="https://metacpan.org/pod/English">English</a>). Eventually, when a <a href="CORE.html#write-FILEHANDLE"><code>write</code></a> is done, the contents of <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$%5EA"><code>$^A</code></a> are written to some filehandle. You could also read <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$%5EA"><code>$^A</code></a> and then set <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$%5EA"><code>$^A</code></a> back to <code>&quot;&quot;</code>. Note that a format typically does one <a href="CORE.html#formline-PICTURE,LIST"><code>formline</code></a> per line of form, but the <a href="CORE.html#formline-PICTURE,LIST"><code>formline</code></a> function itself doesn&#39;t care how many newlines are embedded in the PICTURE. This means that the <code>~</code> and <code>~~</code> tokens treat the entire PICTURE as a single line. You may therefore need to use multiple formlines to implement a single record format, just like the <a href="CORE.html#format"><code>format</code></a> compiler.</p>

<p>Be careful if you put double quotes around the picture, because an <code>@</code> character may be taken to mean the beginning of an array name. <a href="CORE.html#formline-PICTURE,LIST"><code>formline</code></a> always returns true. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlform.pod">perlform</a> for other examples.</p>

<p>If you are trying to use this instead of <a href="CORE.html#write-FILEHANDLE"><code>write</code></a> to capture the output, you may find it easier to open a filehandle to a scalar (<code>open my $fh, &quot;&gt;&quot;, \$output</code>) and write to that instead.</p>

</dd>
<dt id="getc-FILEHANDLE"><a id="getc"></a>getc FILEHANDLE    </dt>
<dd>

</dd>
<dt id="getc1">getc</dt>
<dd>

<p>Returns the next character from the input file attached to FILEHANDLE, or the undefined value at end of file or if there was an error (in the latter case <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$!"><code>$!</code></a> is set). If FILEHANDLE is omitted, reads from STDIN. This is not particularly efficient. However, it cannot be used by itself to fetch single characters without waiting for the user to hit enter. For that, try something more like:</p>

<pre><code>    if ($BSD_STYLE) {
        system &quot;stty cbreak &lt;/dev/tty &gt;/dev/tty 2&gt;&amp;1&quot;;
    }
    else {
        system &quot;stty&quot;, &#39;-icanon&#39;, &#39;eol&#39;, &quot;\001&quot;;
    }

    my $key = getc(STDIN);

    if ($BSD_STYLE) {
        system &quot;stty -cbreak &lt;/dev/tty &gt;/dev/tty 2&gt;&amp;1&quot;;
    }
    else {
        system &#39;stty&#39;, &#39;icanon&#39;, &#39;eol&#39;, &#39;^@&#39;; # ASCII NUL
    }
    print &quot;\n&quot;;</code></pre>

<p>Determination of whether <code>$BSD_STYLE</code> should be set is left as an exercise to the reader.</p>

<p>The <a href="https://metacpan.org/pod/distribution/perl/ext/POSIX/lib/POSIX.pod#getattr"><code>POSIX::getattr</code></a> function can do this more portably on systems purporting POSIX compliance. See also the <a href="../Term::ReadKey.html"><code>Term::ReadKey</code></a> module on CPAN.</p>

</dd>
<dt id="getlogin">getlogin  </dt>
<dd>

<p>This implements the C library function of the same name, which on most systems returns the current login from <i>/etc/utmp</i>, if any. If it returns the empty string, use <a href="CORE.html#getpwuid-UID"><code>getpwuid</code></a>.</p>

<pre><code>    my $login = getlogin || getpwuid($&lt;) || &quot;Kilroy&quot;;</code></pre>

<p>Do not consider <a href="CORE.html#getlogin"><code>getlogin</code></a> for authentication: it is not as secure as <a href="CORE.html#getpwuid-UID"><code>getpwuid</code></a>.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#getlogin">&quot;getlogin&quot; in perlport</a>.</p>

</dd>
<dt id="getpeername-SOCKET"><a id="getpeername"></a>getpeername SOCKET  </dt>
<dd>

<p>Returns the packed sockaddr address of the other end of the SOCKET connection.</p>

<pre><code>    use Socket;
    my $hersockaddr    = getpeername($sock);
    my ($port, $iaddr) = sockaddr_in($hersockaddr);
    my $herhostname    = gethostbyaddr($iaddr, AF_INET);
    my $herstraddr     = inet_ntoa($iaddr);</code></pre>

</dd>
<dt id="getpgrp-PID"><a id="getpgrp"></a>getpgrp PID  </dt>
<dd>

<p>Returns the current process group for the specified PID. Use a PID of <code>0</code> to get the current process group for the current process. Will raise an exception if used on a machine that doesn&#39;t implement <a href="http://man.he.net/man2/getpgrp">getpgrp(2)</a>. If PID is omitted, returns the process group of the current process. Note that the POSIX version of <a href="CORE.html#getpgrp-PID"><code>getpgrp</code></a> does not accept a PID argument, so only <code>PID==0</code> is truly portable.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#getpgrp">&quot;getpgrp&quot; in perlport</a>.</p>

</dd>
<dt id="getppid">getppid   </dt>
<dd>

<p>Returns the process id of the parent process.</p>

<p>Note for Linux users: Between v5.8.1 and v5.16.0 Perl would work around non-POSIX thread semantics the minority of Linux systems (and Debian GNU/kFreeBSD systems) that used LinuxThreads, this emulation has since been removed. See the documentation for <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$$">$$</a> for details.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#getppid">&quot;getppid&quot; in perlport</a>.</p>

</dd>
<dt id="getpriority-WHICH,WHO"><a id="getpriority"></a><a id="getpriority-WHICH-WHO"></a>getpriority WHICH,WHO   </dt>
<dd>

<p>Returns the current priority for a process, a process group, or a user. (See <a href="http://man.he.net/man2/getpriority">getpriority(2)</a>.) Will raise a fatal exception if used on a machine that doesn&#39;t implement <a href="http://man.he.net/man2/getpriority">getpriority(2)</a>.</p>

<p><code>WHICH</code> can be any of <code>PRIO_PROCESS</code>, <code>PRIO_PGRP</code> or <code>PRIO_USER</code> imported from <a href="https://metacpan.org/pod/distribution/perl/ext/POSIX/lib/POSIX.pod#RESOURCE-CONSTANTS">&quot;RESOURCE CONSTANTS&quot; in POSIX</a>.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#getpriority">&quot;getpriority&quot; in perlport</a>.</p>

</dd>
<dt id="getpwnam-NAME"><a id="getpwnam"></a>getpwnam NAME                              </dt>
<dd>

</dd>
<dt id="getgrnam-NAME"><a id="getgrnam"></a>getgrnam NAME</dt>
<dd>

</dd>
<dt id="gethostbyname-NAME"><a id="gethostbyname"></a>gethostbyname NAME</dt>
<dd>

</dd>
<dt id="getnetbyname-NAME"><a id="getnetbyname"></a>getnetbyname NAME</dt>
<dd>

</dd>
<dt id="getprotobyname-NAME"><a id="getprotobyname"></a>getprotobyname NAME</dt>
<dd>

</dd>
<dt id="getpwuid-UID"><a id="getpwuid"></a>getpwuid UID</dt>
<dd>

</dd>
<dt id="getgrgid-GID"><a id="getgrgid"></a>getgrgid GID</dt>
<dd>

</dd>
<dt id="getservbyname-NAME,PROTO"><a id="getservbyname"></a><a id="getservbyname-NAME-PROTO"></a>getservbyname NAME,PROTO</dt>
<dd>

</dd>
<dt id="gethostbyaddr-ADDR,ADDRTYPE"><a id="gethostbyaddr"></a><a id="gethostbyaddr-ADDR-ADDRTYPE"></a>gethostbyaddr ADDR,ADDRTYPE</dt>
<dd>

</dd>
<dt id="getnetbyaddr-ADDR,ADDRTYPE"><a id="getnetbyaddr"></a><a id="getnetbyaddr-ADDR-ADDRTYPE"></a>getnetbyaddr ADDR,ADDRTYPE</dt>
<dd>

</dd>
<dt id="getprotobynumber-NUMBER"><a id="getprotobynumber"></a>getprotobynumber NUMBER</dt>
<dd>

</dd>
<dt id="getservbyport-PORT,PROTO"><a id="getservbyport"></a><a id="getservbyport-PORT-PROTO"></a>getservbyport PORT,PROTO</dt>
<dd>

</dd>
<dt id="getpwent">getpwent</dt>
<dd>

</dd>
<dt id="getgrent">getgrent</dt>
<dd>

</dd>
<dt id="gethostent">gethostent</dt>
<dd>

</dd>
<dt id="getnetent">getnetent</dt>
<dd>

</dd>
<dt id="getprotoent">getprotoent</dt>
<dd>

</dd>
<dt id="getservent">getservent</dt>
<dd>

</dd>
<dt id="setpwent">setpwent</dt>
<dd>

</dd>
<dt id="setgrent">setgrent</dt>
<dd>

</dd>
<dt id="sethostent-STAYOPEN"><a id="sethostent"></a>sethostent STAYOPEN</dt>
<dd>

</dd>
<dt id="setnetent-STAYOPEN"><a id="setnetent"></a>setnetent STAYOPEN</dt>
<dd>

</dd>
<dt id="setprotoent-STAYOPEN"><a id="setprotoent"></a>setprotoent STAYOPEN</dt>
<dd>

</dd>
<dt id="setservent-STAYOPEN"><a id="setservent"></a>setservent STAYOPEN</dt>
<dd>

</dd>
<dt id="endpwent">endpwent</dt>
<dd>

</dd>
<dt id="endgrent">endgrent</dt>
<dd>

</dd>
<dt id="endhostent">endhostent</dt>
<dd>

</dd>
<dt id="endnetent">endnetent</dt>
<dd>

</dd>
<dt id="endprotoent">endprotoent</dt>
<dd>

</dd>
<dt id="endservent">endservent</dt>
<dd>

<p>These routines are the same as their counterparts in the system C library. In list context, the return values from the various get routines are as follows:</p>

<pre><code> #    0        1          2           3         4
 my ( $name,   $passwd,   $gid,       $members  ) = getgr*
 my ( $name,   $aliases,  $addrtype,  $net      ) = getnet*
 my ( $name,   $aliases,  $port,      $proto    ) = getserv*
 my ( $name,   $aliases,  $proto                ) = getproto*
 my ( $name,   $aliases,  $addrtype,  $length,  @addrs ) = gethost*
 my ( $name,   $passwd,   $uid,       $gid,     $quota,
    $comment,  $gcos,     $dir,       $shell,   $expire ) = getpw*
 #    5        6          7           8         9</code></pre>

<p>(If the entry doesn&#39;t exist, the return value is a single meaningless true value.)</p>

<p>The exact meaning of the $gcos field varies but it usually contains the real name of the user (as opposed to the login name) and other information pertaining to the user. Beware, however, that in many system users are able to change this information and therefore it cannot be trusted and therefore the $gcos is tainted (see <a href="https://metacpan.org/pod/distribution/perl/pod/perlsec.pod">perlsec</a>). The $passwd and $shell, user&#39;s encrypted password and login shell, are also tainted, for the same reason.</p>

<p>In scalar context, you get the name, unless the function was a lookup by name, in which case you get the other thing, whatever it is. (If the entry doesn&#39;t exist you get the undefined value.) For example:</p>

<pre><code>    my $uid   = getpwnam($name);
    my $name  = getpwuid($num);
    my $name  = getpwent();
    my $gid   = getgrnam($name);
    my $name  = getgrgid($num);
    my $name  = getgrent();
    # etc.</code></pre>

<p>In <i>getpw*()</i> the fields $quota, $comment, and $expire are special in that they are unsupported on many systems. If the $quota is unsupported, it is an empty scalar. If it is supported, it usually encodes the disk quota. If the $comment field is unsupported, it is an empty scalar. If it is supported it usually encodes some administrative comment about the user. In some systems the $quota field may be $change or $age, fields that have to do with password aging. In some systems the $comment field may be $class. The $expire field, if present, encodes the expiration period of the account or the password. For the availability and the exact meaning of these fields in your system, please consult <a href="http://man.he.net/man3/getpwnam">getpwnam(3)</a> and your system&#39;s <i>pwd.h</i> file. You can also find out from within Perl what your $quota and $comment fields mean and whether you have the $expire field by using the <a href="https://metacpan.org/pod/Config"><code>Config</code></a> module and the values <code>d_pwquota</code>, <code>d_pwage</code>, <code>d_pwchange</code>, <code>d_pwcomment</code>, and <code>d_pwexpire</code>. Shadow password files are supported only if your vendor has implemented them in the intuitive fashion that calling the regular C library routines gets the shadow versions if you&#39;re running under privilege or if there exists the <a href="http://man.he.net/man3/shadow">shadow(3)</a> functions as found in System V (this includes Solaris and Linux). Those systems that implement a proprietary shadow password facility are unlikely to be supported.</p>

<p>The $members value returned by <i>getgr*()</i> is a space-separated list of the login names of the members of the group.</p>

<p>For the <i>gethost*()</i> functions, if the <code>h_errno</code> variable is supported in C, it will be returned to you via <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$?"><code>$?</code></a> if the function call fails. The <code>@addrs</code> value returned by a successful call is a list of raw addresses returned by the corresponding library call. In the Internet domain, each address is four bytes long; you can unpack it by saying something like:</p>

<pre><code>    my ($w,$x,$y,$z) = unpack(&#39;W4&#39;,$addr[0]);</code></pre>

<p>The Socket library makes this slightly easier:</p>

<pre><code>    use Socket;
    my $iaddr = inet_aton(&quot;127.1&quot;); # or whatever address
    my $name  = gethostbyaddr($iaddr, AF_INET);

    # or going the other way
    my $straddr = inet_ntoa($iaddr);</code></pre>

<p>In the opposite way, to resolve a hostname to the IP address you can write this:</p>

<pre><code>    use Socket;
    my $packed_ip = gethostbyname(&quot;www.perl.org&quot;);
    my $ip_address;
    if (defined $packed_ip) {
        $ip_address = inet_ntoa($packed_ip);
    }</code></pre>

<p>Make sure <a href="CORE.html#gethostbyname-NAME"><code>gethostbyname</code></a> is called in SCALAR context and that its return value is checked for definedness.</p>

<p>The <a href="CORE.html#getprotobynumber-NUMBER"><code>getprotobynumber</code></a> function, even though it only takes one argument, has the precedence of a list operator, so beware:</p>

<pre><code>    getprotobynumber $number eq &#39;icmp&#39;   # WRONG
    getprotobynumber($number eq &#39;icmp&#39;)  # actually means this
    getprotobynumber($number) eq &#39;icmp&#39;  # better this way</code></pre>

<p>If you get tired of remembering which element of the return list contains which return value, by-name interfaces are provided in standard modules: <a href="https://metacpan.org/pod/File::stat"><code>File::stat</code></a>, <a href="https://metacpan.org/pod/Net::hostent"><code>Net::hostent</code></a>, <a href="https://metacpan.org/pod/Net::netent"><code>Net::netent</code></a>, <a href="https://metacpan.org/pod/Net::protoent"><code>Net::protoent</code></a>, <a href="https://metacpan.org/pod/Net::servent"><code>Net::servent</code></a>, <a href="https://metacpan.org/pod/Time::gmtime"><code>Time::gmtime</code></a>, <a href="https://metacpan.org/pod/Time::localtime"><code>Time::localtime</code></a>, and <a href="https://metacpan.org/pod/User::grent"><code>User::grent</code></a>. These override the normal built-ins, supplying versions that return objects with the appropriate names for each field. For example:</p>

<pre><code>   use File::stat;
   use User::pwent;
   my $is_his = (stat($filename)-&gt;uid == pwent($whoever)-&gt;uid);</code></pre>

<p>Even though it looks as though they&#39;re the same method calls (uid), they aren&#39;t, because a <code>File::stat</code> object is different from a <code>User::pwent</code> object.</p>

<p>Many of these functions are not safe in a multi-threaded environment where more than one thread can be using them. In particular, functions like <code>getpwent()</code> iterate per-process and not per-thread, so if two threads are simultaneously iterating, neither will get all the records.</p>

<p>Some systems have thread-safe versions of some of the functions, such as <code>getpwnam_r()</code> instead of <code>getpwnam()</code>. There, Perl automatically and invisibly substitutes the thread-safe version, without notice. This means that code that safely runs on some systems can fail on others that lack the thread-safe versions.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#getpwnam">&quot;getpwnam&quot; in perlport</a> to <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#endservent">&quot;endservent&quot; in perlport</a>.</p>

</dd>
<dt id="getsockname-SOCKET"><a id="getsockname"></a>getsockname SOCKET </dt>
<dd>

<p>Returns the packed sockaddr address of this end of the SOCKET connection, in case you don&#39;t know the address because you have several different IPs that the connection might have come in on.</p>

<pre><code>    use Socket;
    my $mysockaddr = getsockname($sock);
    my ($port, $myaddr) = sockaddr_in($mysockaddr);
    printf &quot;Connect to %s [%s]\n&quot;,
       scalar gethostbyaddr($myaddr, AF_INET),
       inet_ntoa($myaddr);</code></pre>

</dd>
<dt id="getsockopt-SOCKET,LEVEL,OPTNAME"><a id="getsockopt"></a><a id="getsockopt-SOCKET-LEVEL-OPTNAME"></a>getsockopt SOCKET,LEVEL,OPTNAME </dt>
<dd>

<p>Queries the option named OPTNAME associated with SOCKET at a given LEVEL. Options may exist at multiple protocol levels depending on the socket type, but at least the uppermost socket level SOL_SOCKET (defined in the <a href="https://metacpan.org/pod/Socket"><code>Socket</code></a> module) will exist. To query options at another level the protocol number of the appropriate protocol controlling the option should be supplied. For example, to indicate that an option is to be interpreted by the TCP protocol, LEVEL should be set to the protocol number of TCP, which you can get using <a href="CORE.html#getprotobyname-NAME"><code>getprotobyname</code></a>.</p>

<p>The function returns a packed string representing the requested socket option, or <a href="CORE.html#undef-EXPR"><code>undef</code></a> on error, with the reason for the error placed in <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$!"><code>$!</code></a>. Just what is in the packed string depends on LEVEL and OPTNAME; consult <a href="http://man.he.net/man2/getsockopt">getsockopt(2)</a> for details. A common case is that the option is an integer, in which case the result is a packed integer, which you can decode using <a href="CORE.html#unpack-TEMPLATE,EXPR"><code>unpack</code></a> with the <code>i</code> (or <code>I</code>) format.</p>

<p>Here&#39;s an example to test whether Nagle&#39;s algorithm is enabled on a socket:</p>

<pre><code>    use Socket qw(:all);

    defined(my $tcp = getprotobyname(&quot;tcp&quot;))
        or die &quot;Could not determine the protocol number for tcp&quot;;
    # my $tcp = IPPROTO_TCP; # Alternative
    my $packed = getsockopt($socket, $tcp, TCP_NODELAY)
        or die &quot;getsockopt TCP_NODELAY: $!&quot;;
    my $nodelay = unpack(&quot;I&quot;, $packed);
    print &quot;Nagle&#39;s algorithm is turned &quot;,
           $nodelay ? &quot;off\n&quot; : &quot;on\n&quot;;</code></pre>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#getsockopt">&quot;getsockopt&quot; in perlport</a>.</p>

</dd>
<dt id="glob-EXPR"><a id="glob"></a>glob EXPR    </dt>
<dd>

</dd>
<dt id="glob1">glob</dt>
<dd>

<p>In list context, returns a (possibly empty) list of filename expansions on the value of EXPR such as the Unix shell Bash would do. In scalar context, glob iterates through such filename expansions, returning <a href="CORE.html#undef-EXPR"><code>undef</code></a> when the list is exhausted. If EXPR is omitted, <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a> is used.</p>

<pre><code>    # List context
    my @txt_files  = glob(&quot;*.txt&quot;);
    my @perl_files = glob(&quot;*.pl *.pm&quot;);

    # Scalar context
    while (my $file = glob(&quot;*.mp3&quot;)) {
        # Do stuff
    }</code></pre>

<p>Glob also supports an alternate syntax using <code>&lt;</code> <code>&gt;</code> as delimiters. While this syntax is supported, it is recommended that you use <code>glob</code> instead as it is more readable and searchable.</p>

<pre><code>    my @txt_files  = &lt;&quot;*.txt&quot;&gt;;</code></pre>

<p>If you need case insensitive file globbing that can be achieved using the <code>:nocase</code> parameter of the <a href="https://metacpan.org/pod/File::Glob#bsd_glob"><code>bsd_glob</code></a> module.</p>

<pre><code>    use File::Glob qw(:globally :nocase);

        my @txt = glob(&quot;readme*&quot;); # README readme.txt Readme.md</code></pre>

<p>Note that <a href="CORE.html#glob-EXPR"><code>glob</code></a> splits its arguments on whitespace and treats each segment as separate pattern. As such, <code>glob(&quot;*.c *.h&quot;)</code> matches all files with a <i>.c</i> or <i>.h</i> extension. The expression <code>glob(&quot;.* *&quot;)</code> matches all files in the current working directory. If you want to glob filenames that might contain whitespace, you&#39;ll have to use extra quotes around the spacey filename to protect it. For example, to glob filenames that have an <code>e</code> followed by a space followed by an <code>f</code>, use one of:</p>

<pre><code>    my @spacies = &lt;&quot;*e f*&quot;&gt;;
    my @spacies = glob(&#39;&quot;*e f*&quot;&#39;);
    my @spacies = glob(q(&quot;*e f*&quot;));</code></pre>

<p>If you had to get a variable through, you could do this:</p>

<pre><code>    my @spacies = glob(&quot;&#39;*${var}e f*&#39;&quot;);
    my @spacies = glob(qq(&quot;*${var}e f*&quot;));</code></pre>

<p>If non-empty braces are the only wildcard characters used in the <a href="CORE.html#glob-EXPR"><code>glob</code></a>, no filenames are matched, but potentially many strings are returned. For example, this produces nine strings, one for each pairing of fruits and colors:</p>

<pre><code>    my @many = glob(&quot;{apple,tomato,cherry}={green,yellow,red}&quot;);</code></pre>

<p>This operator is implemented using the standard <code>File::Glob</code> extension. See <a href="https://metacpan.org/pod/File::Glob#bsd_glob"><code>bsd_glob</code></a> for details, including <a href="https://metacpan.org/pod/File::Glob#bsd_glob"><code>bsd_glob</code></a>, which does not treat whitespace as a pattern separator.</p>

<p>If a <code>glob</code> expression is used as the condition of a <code>while</code> or <code>for</code> loop, then it will be implicitly assigned to <code>$_</code>. If either a <code>glob</code> expression or an explicit assignment of a <code>glob</code> expression to a scalar is used as a <code>while</code>/<code>for</code> condition, then the condition actually tests for definedness of the expression&#39;s value, not for its regular truth value.</p>

<p>Internal implemenation details:</p>

<p>This is the internal function implementing the <code>&lt;*.c&gt;</code> operator, but you can use it directly. The <code>&lt;*.c&gt;</code> operator is discussed in more detail in <a href="https://metacpan.org/pod/distribution/perl/pod/perlop.pod#I/O-Operators">&quot;I/O Operators&quot; in perlop</a>.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#glob">&quot;glob&quot; in perlport</a>.</p>

</dd>
<dt id="gmtime-EXPR"><a id="gmtime"></a>gmtime EXPR   </dt>
<dd>

</dd>
<dt id="gmtime1">gmtime</dt>
<dd>

<p>Works just like <a href="CORE.html#localtime-EXPR"><code>localtime</code></a>, but the returned values are localized for the standard Greenwich time zone.</p>

<p>Note: When called in list context, $isdst, the last value returned by gmtime, is always <code>0</code>. There is no Daylight Saving Time in GMT.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#gmtime">&quot;gmtime&quot; in perlport</a>.</p>

</dd>
<dt id="goto-LABEL"><a id="goto"></a>goto LABEL   </dt>
<dd>

</dd>
<dt id="goto-EXPR"><a id="goto1"></a>goto EXPR</dt>
<dd>

</dd>
<dt id="goto-&amp;NAME"><a id="goto2"></a><a id="goto--NAME"></a>goto &amp;NAME</dt>
<dd>

<p>The <code>goto LABEL</code> form finds the statement labeled with LABEL and resumes execution there. It can&#39;t be used to get out of a block or subroutine given to <a href="CORE.html#sort-SUBNAME-LIST"><code>sort</code></a>. It can be used to go almost anywhere else within the dynamic scope, including out of subroutines, but it&#39;s usually better to use some other construct such as <a href="CORE.html#last-LABEL"><code>last</code></a> or <a href="CORE.html#die-LIST"><code>die</code></a>. The author of Perl has never felt the need to use this form of <a href="CORE.html#goto-LABEL"><code>goto</code></a> (in Perl, that is; C is another matter). (The difference is that C does not offer named loops combined with loop control. Perl does, and this replaces most structured uses of <a href="CORE.html#goto-LABEL"><code>goto</code></a> in other languages.)</p>

<p>The <code>goto EXPR</code> form expects to evaluate <code>EXPR</code> to a code reference or a label name. If it evaluates to a code reference, it will be handled like <code>goto &amp;NAME</code>, below. This is especially useful for implementing tail recursion via <code>goto __SUB__</code>.</p>

<p>If the expression evaluates to a label name, its scope will be resolved dynamically. This allows for computed <a href="CORE.html#goto-LABEL"><code>goto</code></a>s per FORTRAN, but isn&#39;t necessarily recommended if you&#39;re optimizing for maintainability:</p>

<pre><code>    goto (&quot;FOO&quot;, &quot;BAR&quot;, &quot;GLARCH&quot;)[$i];</code></pre>

<p>As shown in this example, <code>goto EXPR</code> is exempt from the &quot;looks like a function&quot; rule. A pair of parentheses following it does not (necessarily) delimit its argument. <code>goto(&quot;NE&quot;).&quot;XT&quot;</code> is equivalent to <code>goto NEXT</code>. Also, unlike most named operators, this has the same precedence as assignment.</p>

<p>Use of <code>goto LABEL</code> or <code>goto EXPR</code> to jump into a construct is deprecated and will issue a warning. Even then, it may not be used to go into any construct that requires initialization, such as a subroutine, a <code>foreach</code> loop, or a <code>given</code> block. In general, it may not be used to jump into the parameter of a binary or list operator, but it may be used to jump into the <i>first</i> parameter of a binary operator. (The <code>=</code> assignment operator&#39;s &quot;first&quot; operand is its right-hand operand.) It also can&#39;t be used to go into a construct that is optimized away.</p>

<p>The <code>goto &amp;NAME</code> form is quite different from the other forms of <a href="CORE.html#goto-LABEL"><code>goto</code></a>. In fact, it isn&#39;t a goto in the normal sense at all, and doesn&#39;t have the stigma associated with other gotos. Instead, it exits the current subroutine (losing any changes set by <a href="CORE.html#local-EXPR"><code>local</code></a>) and immediately calls in its place the named subroutine using the current value of <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#@_"><code>@_</code></a>. This is used by <code>AUTOLOAD</code> subroutines that wish to load another subroutine and then pretend that the other subroutine had been called in the first place (except that any modifications to <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#@_"><code>@_</code></a> in the current subroutine are propagated to the other subroutine.) After the <a href="CORE.html#goto-LABEL"><code>goto</code></a>, not even <a href="CORE.html#caller-EXPR"><code>caller</code></a> will be able to tell that this routine was called first.</p>

<p>NAME needn&#39;t be the name of a subroutine; it can be a scalar variable containing a code reference or a block that evaluates to a code reference.</p>

</dd>
<dt id="grep-BLOCK-LIST"><a id="grep"></a>grep BLOCK LIST </dt>
<dd>

</dd>
<dt id="grep-EXPR,LIST"><a id="grep1"></a><a id="grep-EXPR-LIST"></a>grep EXPR,LIST</dt>
<dd>

<p>This is similar in spirit to, but not the same as, <a href="http://man.he.net/man1/grep">grep(1)</a> and its relatives. In particular, it is not limited to using regular expressions.</p>

<p>Evaluates the BLOCK or EXPR for each element of LIST (locally setting <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a> to each element) and returns the list value consisting of those elements for which the expression evaluated to true. In scalar context, returns the number of times the expression was true.</p>

<pre><code>    my @foo = grep(!/^#/, @bar);    # weed out comments</code></pre>

<p>or equivalently,</p>

<pre><code>    my @foo = grep {!/^#/} @bar;    # weed out comments</code></pre>

<p>Note that <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a> is an alias to the list value, so it can be used to modify the elements of the LIST. While this is useful and supported, it can cause bizarre results if the elements of LIST are not variables. Similarly, grep returns aliases into the original list, much as a for loop&#39;s index variable aliases the list elements. That is, modifying an element of a list returned by grep (for example, in a <code>foreach</code>, <a href="CORE.html#map-BLOCK-LIST"><code>map</code></a> or another <a href="CORE.html#grep-BLOCK-LIST"><code>grep</code></a>) actually modifies the element in the original list. This is usually something to be avoided when writing clear code.</p>

<p>See also <a href="CORE.html#map-BLOCK-LIST"><code>map</code></a> for a list composed of the results of the BLOCK or EXPR.</p>

</dd>
<dt id="hex-EXPR"><a id="hex"></a>hex EXPR  </dt>
<dd>

</dd>
<dt id="hex1">hex</dt>
<dd>

<p>Interprets EXPR as a hex string and returns the corresponding numeric value. If EXPR is omitted, uses <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a>.</p>

<pre><code>    print hex &#39;0xAf&#39;; # prints &#39;175&#39;
    print hex &#39;aF&#39;;   # same
    $valid_input =~ /\A(?:0?[xX])?(?:_?[0-9a-fA-F])*\z/</code></pre>

<p>A hex string consists of hex digits and an optional <code>0x</code> or <code>x</code> prefix. Each hex digit may be preceded by a single underscore, which will be ignored. Any other character triggers a warning and causes the rest of the string to be ignored (even leading whitespace, unlike <a href="CORE.html#oct-EXPR"><code>oct</code></a>). Only integers can be represented, and integer overflow triggers a warning.</p>

<p>To convert strings that might start with any of <code>0</code>, <code>0x</code>, or <code>0b</code>, see <a href="CORE.html#oct-EXPR"><code>oct</code></a>. To present something as hex, look into <a href="CORE.html#printf-FILEHANDLE-FORMAT,-LIST"><code>printf</code></a>, <a href="CORE.html#sprintf-FORMAT,-LIST"><code>sprintf</code></a>, and <a href="CORE.html#unpack-TEMPLATE,EXPR"><code>unpack</code></a>.</p>

</dd>
<dt id="import-LIST"><a id="import"></a>import LIST </dt>
<dd>

<p>There is no builtin <a href="CORE.html#import-LIST"><code>import</code></a> function. It is just an ordinary method (subroutine) defined (or inherited) by modules that wish to export names to another module. The <a href="CORE.html#use-Module-VERSION-LIST"><code>use</code></a> function calls the <a href="CORE.html#import-LIST"><code>import</code></a> method for the package used. See also <a href="CORE.html#use-Module-VERSION-LIST"><code>use</code></a>, <a href="https://metacpan.org/pod/distribution/perl/pod/perlmod.pod">perlmod</a>, and <a href="https://metacpan.org/pod/Exporter">Exporter</a>.</p>

</dd>
<dt id="index-STR,SUBSTR,POSITION"><a id="index"></a><a id="index-STR-SUBSTR-POSITION"></a>index STR,SUBSTR,POSITION   </dt>
<dd>

</dd>
<dt id="index-STR,SUBSTR"><a id="index1"></a><a id="index-STR-SUBSTR"></a>index STR,SUBSTR</dt>
<dd>

<p>The index function searches for one string within another, but without the wildcard-like behavior of a full regular-expression pattern match. It returns the position of the first occurrence of SUBSTR in STR at or after POSITION. If POSITION is omitted, starts searching from the beginning of the string. POSITION before the beginning of the string or after its end is treated as if it were the beginning or the end, respectively. POSITION and the return value are based at zero. If the substring is not found, <a href="CORE.html#index-STR,SUBSTR,POSITION"><code>index</code></a> returns -1.</p>

<p>Find characters or strings:</p>

<pre><code>    index(&quot;Perl is great&quot;, &quot;P&quot;);     # Returns 0
    index(&quot;Perl is great&quot;, &quot;g&quot;);     # Returns 8
    index(&quot;Perl is great&quot;, &quot;great&quot;); # Also returns 8</code></pre>

<p>Attempting to find something not there:</p>

<pre><code>    index(&quot;Perl is great&quot;, &quot;Z&quot;);     # Returns -1 (not found)</code></pre>

<p>Using an offset to find the <i>second</i> occurrence:</p>

<pre><code>    index(&quot;Perl is great&quot;, &quot;e&quot;, 5);  # Returns 10</code></pre>

</dd>
<dt id="int-EXPR"><a id="int"></a>int EXPR     </dt>
<dd>

</dd>
<dt id="int1">int</dt>
<dd>

<p>Returns the integer portion of EXPR. If EXPR is omitted, uses <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a>. You should not use this function for rounding: one because it truncates towards <code>0</code>, and two because machine representations of floating-point numbers can sometimes produce counterintuitive results. For example, <code>int(-6.725/0.025)</code> produces -268 rather than the correct -269; that&#39;s because it&#39;s really more like -268.99999999999994315658 instead. Usually, the <a href="CORE.html#sprintf-FORMAT,-LIST"><code>sprintf</code></a>, <a href="CORE.html#printf-FILEHANDLE-FORMAT,-LIST"><code>printf</code></a>, or the <a href="https://metacpan.org/pod/distribution/perl/ext/POSIX/lib/POSIX.pod#floor"><code>POSIX::floor</code></a> and <a href="https://metacpan.org/pod/distribution/perl/ext/POSIX/lib/POSIX.pod#ceil"><code>POSIX::ceil</code></a> functions will serve you better than will <a href="CORE.html#int-EXPR"><code>int</code></a>.</p>

</dd>
<dt id="ioctl-FILEHANDLE,FUNCTION,SCALAR"><a id="ioctl"></a><a id="ioctl-FILEHANDLE-FUNCTION-SCALAR"></a>ioctl FILEHANDLE,FUNCTION,SCALAR </dt>
<dd>

<p>Implements the <a href="http://man.he.net/man2/ioctl">ioctl(2)</a> function. You&#39;ll probably first have to say</p>

<pre><code>    require &quot;sys/ioctl.ph&quot;;  # probably in
                             # $Config{archlib}/sys/ioctl.ph</code></pre>

<p>to get the correct function definitions. If <i>sys/ioctl.ph</i> doesn&#39;t exist or doesn&#39;t have the correct definitions you&#39;ll have to roll your own, based on your C header files such as <i>&lt;sys/ioctl.h&gt;</i>. (There is a Perl script called <b>h2ph</b> that comes with the Perl kit that may help you in this, but it&#39;s nontrivial.) SCALAR will be read and/or written depending on the FUNCTION; a C pointer to the string value of SCALAR will be passed as the third argument of the actual <a href="CORE.html#ioctl-FILEHANDLE,FUNCTION,SCALAR"><code>ioctl</code></a> call. (If SCALAR has no string value but does have a numeric value, that value will be passed rather than a pointer to the string value. To guarantee this to be true, add a <code>0</code> to the scalar before using it.) The <a href="CORE.html#pack-TEMPLATE,LIST"><code>pack</code></a> and <a href="CORE.html#unpack-TEMPLATE,EXPR"><code>unpack</code></a> functions may be needed to manipulate the values of structures used by <a href="CORE.html#ioctl-FILEHANDLE,FUNCTION,SCALAR"><code>ioctl</code></a>.</p>

<p>The return value of <a href="CORE.html#ioctl-FILEHANDLE,FUNCTION,SCALAR"><code>ioctl</code></a> (and <a href="CORE.html#fcntl-FILEHANDLE,FUNCTION,SCALAR"><code>fcntl</code></a>) is as follows:</p>

<pre><code>    if OS returns:      then Perl returns:
        -1               undefined value
         0              string &quot;0 but true&quot;
    anything else           that number</code></pre>

<p>Thus Perl returns true on success and false on failure, yet you can still easily determine the actual value returned by the operating system:</p>

<pre><code>    my $retval = ioctl(...) || -1;
    printf &quot;System returned %d\n&quot;, $retval;</code></pre>

<p>The special string <code>&quot;0 but true&quot;</code> is exempt from <a href="https://metacpan.org/pod/distribution/perl/pod/perldiag.pod#Argument-%22%25s%22-isn&#39;t-numeric%25s"><code>Argument &quot;...&quot; isn&#39;t numeric</code></a> <a href="https://metacpan.org/pod/warnings">warnings</a> on improper numeric conversions.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#ioctl">&quot;ioctl&quot; in perlport</a>.</p>

</dd>
<dt id="join-EXPR,LIST"><a id="join"></a><a id="join-EXPR-LIST"></a>join EXPR,LIST </dt>
<dd>

<p>Joins the separate strings of LIST into a single string with fields separated by the value of EXPR, and returns that new string. Example:</p>

<pre><code>   my $rec = join(&#39;:&#39;, $login,$passwd,$uid,$gid,$gcos,$home,$shell);</code></pre>

<p>Beware that unlike <a href="CORE.html#split-/PATTERN/,EXPR,LIMIT"><code>split</code></a>, <a href="CORE.html#join-EXPR,LIST"><code>join</code></a> doesn&#39;t take a pattern as its first argument. Compare <a href="CORE.html#split-/PATTERN/,EXPR,LIMIT"><code>split</code></a>.</p>

</dd>
<dt id="keys-HASH"><a id="keys"></a>keys HASH  </dt>
<dd>

</dd>
<dt id="keys-ARRAY"><a id="keys1"></a>keys ARRAY</dt>
<dd>

<p>Called in list context, returns a list consisting of all the keys of the named hash, or in Perl 5.12 or later only, the indices of an array. Perl releases prior to 5.12 will produce a syntax error if you try to use an array argument. In scalar context, returns the number of keys or indices.</p>

<p>Hash entries are returned in an apparently random order. The actual random order is specific to a given hash; the exact same series of operations on two hashes may result in a different order for each hash. Any insertion into the hash may change the order, as will any deletion, with the exception that the most recent key returned by <a href="CORE.html#each-HASH"><code>each</code></a> or <a href="CORE.html#keys-HASH"><code>keys</code></a> may be deleted without changing the order. So long as a given hash is unmodified you may rely on <a href="CORE.html#keys-HASH"><code>keys</code></a>, <a href="CORE.html#values-HASH"><code>values</code></a> and <a href="CORE.html#each-HASH"><code>each</code></a> to repeatedly return the same order as each other. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlsec.pod#Algorithmic-Complexity-Attacks">&quot;Algorithmic Complexity Attacks&quot; in perlsec</a> for details on why hash order is randomized. Aside from the guarantees provided here the exact details of Perl&#39;s hash algorithm and the hash traversal order are subject to change in any release of Perl. Tied hashes may behave differently to Perl&#39;s hashes with respect to changes in order on insertion and deletion of items.</p>

<p>As a side effect, calling <a href="CORE.html#keys-HASH"><code>keys</code></a> resets the internal iterator of the HASH or ARRAY (see <a href="CORE.html#each-HASH"><code>each</code></a>) before yielding the keys. In particular, calling <a href="CORE.html#keys-HASH"><code>keys</code></a> in void context resets the iterator with no other overhead.</p>

<p>Here is yet another way to print your environment:</p>

<pre><code>    my @keys = keys %ENV;
    my @values = values %ENV;
    while (@keys) {
        print pop(@keys), &#39;=&#39;, pop(@values), &quot;\n&quot;;
    }</code></pre>

<p>or how about sorted by key:</p>

<pre><code>    foreach my $key (sort(keys %ENV)) {
        print $key, &#39;=&#39;, $ENV{$key}, &quot;\n&quot;;
    }</code></pre>

<p>The returned values are copies of the original keys in the hash, so modifying them will not affect the original hash. Compare <a href="CORE.html#values-HASH"><code>values</code></a>.</p>

<p>To sort a hash by value, you&#39;ll need to use a <a href="CORE.html#sort-SUBNAME-LIST"><code>sort</code></a> function. Here&#39;s a descending numeric sort of a hash by its values:</p>

<pre><code>    foreach my $key (sort { $hash{$b} &lt;=&gt; $hash{$a} } keys %hash) {
        printf &quot;%4d %s\n&quot;, $hash{$key}, $key;
    }</code></pre>

<p>Used as an lvalue, <a href="CORE.html#keys-HASH"><code>keys</code></a> allows you to increase the number of hash buckets allocated for the given hash. This can gain you a measure of efficiency if you know the hash is going to get big. (This is similar to pre-extending an array by assigning a larger number to $#array.) If you say</p>

<pre><code>    keys %hash = 200;</code></pre>

<p>then <code>%hash</code> will have at least 200 buckets allocated for it--256 of them, in fact, since it rounds up to the next power of two. These buckets will be retained even if you do <code>%hash = ()</code>, use <code>undef %hash</code> if you want to free the storage while <code>%hash</code> is still in scope. You can&#39;t shrink the number of buckets allocated for the hash using <a href="CORE.html#keys-HASH"><code>keys</code></a> in this way (but you needn&#39;t worry about doing this by accident, as trying has no effect). <code>keys @array</code> in an lvalue context is a syntax error.</p>

<p>Starting with Perl 5.14, an experimental feature allowed <a href="CORE.html#keys-HASH"><code>keys</code></a> to take a scalar expression. This experiment has been deemed unsuccessful, and was removed as of Perl 5.24.</p>

<p>To avoid confusing would-be users of your code who are running earlier versions of Perl with mysterious syntax errors, put this sort of thing at the top of your file to signal that your code will work <i>only</i> on Perls of a recent vintage:</p>

<pre><code>    use v5.12;  # so keys/values/each work on arrays</code></pre>

<p>See also <a href="CORE.html#each-HASH"><code>each</code></a>, <a href="CORE.html#values-HASH"><code>values</code></a>, and <a href="CORE.html#sort-SUBNAME-LIST"><code>sort</code></a>.</p>

</dd>
<dt id="kill-SIGNAL,-LIST"><a id="kill"></a><a id="kill-SIGNAL--LIST"></a>kill SIGNAL, LIST</dt>
<dd>

</dd>
<dt id="kill-SIGNAL"><a id="kill1"></a>kill SIGNAL  </dt>
<dd>

<p>Sends a signal to a list of processes. Returns the number of arguments that were successfully used to signal (which is not necessarily the same as the number of processes actually killed, e.g. where a process group is killed).</p>

<pre><code>    my $cnt = kill &#39;HUP&#39;, $child1, $child2;
    kill &#39;KILL&#39;, @goners;</code></pre>

<p>SIGNAL may be either a signal name (a string) or a signal number. A signal name may start with a <code>SIG</code> prefix, thus <code>FOO</code> and <code>SIGFOO</code> refer to the same signal. The string form of SIGNAL is recommended for portability because the same signal may have different numbers in different operating systems.</p>

<p>A list of signal names supported by the current platform can be found in <code>$Config{sig_name}</code>, which is provided by the <a href="https://metacpan.org/pod/Config"><code>Config</code></a> module. See <a href="https://metacpan.org/pod/Config">Config</a> for more details.</p>

<p>A negative signal name is the same as a negative signal number, killing process groups instead of processes. For example, <code>kill &#39;-KILL&#39;, $pgrp</code> and <code>kill -9, $pgrp</code> will send <code>SIGKILL</code> to the entire process group specified. That means you usually want to use positive not negative signals.</p>

<p>If SIGNAL is either the number 0 or the string <code>ZERO</code> (or <code>SIGZERO</code>), no signal is sent to the process, but <a href="CORE.html#kill-SIGNAL,-LIST"><code>kill</code></a> checks whether it&#39;s <i>possible</i> to send a signal to it (that means, to be brief, that the process is owned by the same user, or we are the super-user). This is useful to check that a child process is still alive (even if only as a zombie) and hasn&#39;t changed its UID. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod">perlport</a> for notes on the portability of this construct.</p>

<p>The behavior of kill when a <i>PROCESS</i> number is zero or negative depends on the operating system. For example, on POSIX-conforming systems, zero will signal the current process group, -1 will signal all processes, and any other negative PROCESS number will act as a negative signal number and kill the entire process group specified.</p>

<p>If both the SIGNAL and the PROCESS are negative, the results are undefined. A warning may be produced in a future version.</p>

<p>See <a href="https://metacpan.org/pod/distribution/perl/pod/perlipc.pod#Signals">&quot;Signals&quot; in perlipc</a> for more details.</p>

<p>On some platforms such as Windows where the <a href="http://man.he.net/man2/fork">fork(2)</a> system call is not available, Perl can be built to emulate <a href="CORE.html#fork"><code>fork</code></a> at the interpreter level. This emulation has limitations related to kill that have to be considered, for code running on Windows and in code intended to be portable.</p>

<p>See <a href="https://metacpan.org/pod/distribution/perl/pod/perlfork.pod">perlfork</a> for more details.</p>

<p>If there is no <i>LIST</i> of processes, no signal is sent, and the return value is 0. This form is sometimes used, however, because it causes tainting checks to be run, if your perl support taint checks. But see <a href="https://metacpan.org/pod/distribution/perl/pod/perlsec.pod#Laundering-and-Detecting-Tainted-Data">&quot;Laundering and Detecting Tainted Data&quot; in perlsec</a>.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#kill">&quot;kill&quot; in perlport</a>.</p>

</dd>
<dt id="last-LABEL"><a id="last"></a>last LABEL  </dt>
<dd>

</dd>
<dt id="last-EXPR"><a id="last1"></a>last EXPR</dt>
<dd>

</dd>
<dt id="last2">last</dt>
<dd>

<p>The <a href="CORE.html#last-LABEL"><code>last</code></a> command is like the <code>break</code> statement in C (as used in loops); it immediately exits the loop in question. If the LABEL is omitted, the command refers to the innermost enclosing loop. The <code>last EXPR</code> form, available starting in Perl 5.18.0, allows a label name to be computed at run time, and is otherwise identical to <code>last LABEL</code>. The <a href="CORE.html#continue-BLOCK"><code>continue</code></a> block, if any, is not executed:</p>

<pre><code>    LINE: while (&lt;STDIN&gt;) {
        last LINE if /^$/;  # exit when done with header
        #...
    }</code></pre>

<p><a href="CORE.html#last-LABEL"><code>last</code></a> cannot return a value from a block that typically returns a value, such as <code>eval {}</code>, <code>sub {}</code>, or <code>do {}</code>. It will perform its flow control behavior, which precludes any return value. It should not be used to exit a <a href="CORE.html#grep-BLOCK-LIST"><code>grep</code></a> or <a href="CORE.html#map-BLOCK-LIST"><code>map</code></a> operation.</p>

<p>Note that a block by itself is semantically identical to a loop that executes once. Thus <a href="CORE.html#last-LABEL"><code>last</code></a> can be used to effect an early exit out of such a block.</p>

<p>See also <a href="CORE.html#continue-BLOCK"><code>continue</code></a> for an illustration of how <a href="CORE.html#last-LABEL"><code>last</code></a>, <a href="CORE.html#next-LABEL"><code>next</code></a>, and <a href="CORE.html#redo-LABEL"><code>redo</code></a> work.</p>

<p>Unlike most named operators, this has the same precedence as assignment. It is also exempt from the looks-like-a-function rule, so <code>last (&quot;foo&quot;).&quot;bar&quot;</code> will cause &quot;bar&quot; to be part of the argument to <a href="CORE.html#last-LABEL"><code>last</code></a>.</p>

</dd>
<dt id="lc-EXPR"><a id="lc"></a>lc EXPR  </dt>
<dd>

</dd>
<dt id="lc1">lc</dt>
<dd>

<p>Returns a lowercased version of EXPR. If EXPR is omitted, uses <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a>.</p>

<pre><code>    my $str = lc(&quot;Perl is GREAT&quot;); # &quot;perl is great&quot;</code></pre>

<p>What gets returned depends on several factors:</p>

<dl>

<dt id="If-use-bytes-is-in-effect:"><a id="If"></a><a id="If-use-bytes-is-in-effect"></a>If <code>use bytes</code> is in effect:</dt>
<dd>

<p>The results follow ASCII rules. Only the characters <code>A-Z</code> change, to <code>a-z</code> respectively.</p>

</dd>
<dt id="Otherwise,-if-use-locale-for-LC_CTYPE-is-in-effect:"><a id="Otherwise"></a><a id="Otherwise--if-use-locale-for-LC_CTYPE-is-in-effect"></a>Otherwise, if <code>use locale</code> for <code>LC_CTYPE</code> is in effect:</dt>
<dd>

<p>Respects current <code>LC_CTYPE</code> locale for code points &lt; 256; and uses Unicode rules for the remaining code points (this last can only happen if the UTF8 flag is also set). See <a href="https://metacpan.org/pod/distribution/perl/pod/perllocale.pod">perllocale</a>.</p>

<p>Starting in v5.20, Perl uses full Unicode rules if the locale is UTF-8. Otherwise, there is a deficiency in this scheme, which is that case changes that cross the 255/256 boundary are not well-defined. For example, the lower case of LATIN CAPITAL LETTER SHARP S (U+1E9E) in Unicode rules is U+00DF (on ASCII platforms). But under <code>use locale</code> (prior to v5.20 or not a UTF-8 locale), the lower case of U+1E9E is itself, because 0xDF may not be LATIN SMALL LETTER SHARP S in the current locale, and Perl has no way of knowing if that character even exists in the locale, much less what code point it is. Perl returns a result that is above 255 (almost always the input character unchanged), for all instances (and there aren&#39;t many) where the 255/256 boundary would otherwise be crossed; and starting in v5.22, it raises a <a href="https://metacpan.org/pod/distribution/perl/pod/perldiag.pod#Can&#39;t-do-%25s(%22%25s%22)-on-non-UTF-8-locale;-resolved-to-%22%25s%22.">locale</a> warning.</p>

</dd>
<dt id="Otherwise,-If-EXPR-has-the-UTF8-flag-set:"><a id="Otherwise1"></a><a id="Otherwise--If-EXPR-has-the-UTF8-flag-set"></a>Otherwise, If EXPR has the UTF8 flag set:</dt>
<dd>

<p>Unicode rules are used for the case change.</p>

</dd>
<dt id="Otherwise,-if-use-feature-&#39;unicode_strings&#39;-or-use-locale-&#39;:not_characters&#39;-is-in-effect:"><a id="Otherwise2"></a><a id="Otherwise--if-use-feature--unicode_strings--or-use-locale--:not_characters--is-in-effect"></a>Otherwise, if <code>use feature &#39;unicode_strings&#39;</code> or <code>use locale &#39;:not_characters&#39;</code> is in effect:</dt>
<dd>

<p>Unicode rules are used for the case change.</p>

</dd>
<dt id="Otherwise:"><a id="Otherwise3"></a>Otherwise:</dt>
<dd>

<p>ASCII rules are used for the case change. The lowercase of any character outside the ASCII range is the character itself.</p>

</dd>
</dl>

<p><b>Note:</b> This is the internal function implementing the <a href="https://metacpan.org/pod/distribution/perl/pod/perlop.pod#Quote-and-Quote-like-Operators"><code>\L</code></a> escape in double-quoted strings.</p>

<pre><code>    my $str = &quot;Perl is \LGREAT\E&quot;; # &quot;Perl is great&quot;</code></pre>

</dd>
<dt id="lcfirst-EXPR"><a id="lcfirst"></a>lcfirst EXPR  </dt>
<dd>

</dd>
<dt id="lcfirst1">lcfirst</dt>
<dd>

<p>Returns the value of EXPR with the first character lowercased. This is the internal function implementing the <code>\l</code> escape in double-quoted strings.</p>

<p>If EXPR is omitted, uses <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a>.</p>

<p>This function behaves the same way under various pragmas, such as in a locale, as <a href="CORE.html#lc-EXPR"><code>lc</code></a> does.</p>

</dd>
<dt id="length-EXPR"><a id="length"></a>length EXPR  </dt>
<dd>

</dd>
<dt id="length1">length</dt>
<dd>

<p>Returns the length in <i>characters</i> of the value of EXPR. If EXPR is omitted, returns the length of <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a>. If EXPR is undefined, returns <a href="CORE.html#undef-EXPR"><code>undef</code></a>.</p>

<p>This function cannot be used on an entire array or hash to find out how many elements these have. For that, use <code>scalar @array</code> and <code>scalar keys %hash</code>, respectively.</p>

<p>Like all Perl character operations, <a href="CORE.html#length-EXPR"><code>length</code></a> normally deals in logical characters, not physical bytes. For how many bytes a string encoded as UTF-8 would take up, use <code>length(Encode::encode(&#39;UTF-8&#39;, EXPR))</code> (you&#39;ll have to <code>use Encode</code> first). See <a href="https://metacpan.org/pod/Encode">Encode</a> and <a href="https://metacpan.org/pod/distribution/perl/pod/perlunicode.pod">perlunicode</a>.</p>

</dd>
<dt id="__LINE__"><a id="LINE__"></a>__LINE__ </dt>
<dd>

<p>A special token that compiles to the current line number. It can be altered by the mechanism described at <a href="https://metacpan.org/pod/distribution/perl/pod/perlsyn.pod#Plain-Old-Comments-(Not!)">&quot;Plain Old Comments (Not!)&quot; in perlsyn</a>.</p>

</dd>
<dt id="link-OLDFILE,NEWFILE"><a id="link"></a><a id="link-OLDFILE-NEWFILE"></a>link OLDFILE,NEWFILE </dt>
<dd>

<p>Creates a new filename linked to the old filename. Returns true for success, false otherwise.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#link">&quot;link&quot; in perlport</a>.</p>

</dd>
<dt id="listen-SOCKET,QUEUESIZE"><a id="listen"></a><a id="listen-SOCKET-QUEUESIZE"></a>listen SOCKET,QUEUESIZE </dt>
<dd>

<p>Does the same thing that the <a href="http://man.he.net/man2/listen">listen(2)</a> system call does. Returns true if it succeeded, false otherwise. See the example in <a href="https://metacpan.org/pod/distribution/perl/pod/perlipc.pod#Sockets:-Client/Server-Communication">&quot;Sockets: Client/Server Communication&quot; in perlipc</a>.</p>

</dd>
<dt id="local-EXPR"><a id="local"></a>local EXPR </dt>
<dd>

<p>You really probably want to be using <a href="CORE.html#my-VARLIST"><code>my</code></a> instead, because <a href="CORE.html#local-EXPR"><code>local</code></a> isn&#39;t what most people think of as &quot;local&quot;. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlsub.pod#Private-Variables-via-my()">&quot;Private Variables via my()&quot; in perlsub</a> for details.</p>

<p>A local modifies the listed variables to be local to the enclosing block, file, or eval. If more than one value is listed, the list must be placed in parentheses. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlsub.pod#Temporary-Values-via-local()">&quot;Temporary Values via local()&quot; in perlsub</a> for details, including issues with tied arrays and hashes.</p>

<p>The <code>delete local EXPR</code> construct can also be used to localize the deletion of array/hash elements to the current block. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlsub.pod#Localized-deletion-of-elements-of-composite-types">&quot;Localized deletion of elements of composite types&quot; in perlsub</a>.</p>

</dd>
<dt id="localtime-EXPR"><a id="localtime"></a>localtime EXPR  </dt>
<dd>

</dd>
<dt id="localtime1">localtime</dt>
<dd>

<p>Converts a time as returned by the time function to a 9-element list with the time analyzed for the local time zone. Typically used as follows:</p>

<pre><code>    #     0    1    2     3     4    5     6     7     8
    my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
                                                localtime(time);</code></pre>

<p>All list elements are numeric and come straight out of the C `struct tm&#39;. <code>$sec</code>, <code>$min</code>, and <code>$hour</code> are the seconds, minutes, and hours of the specified time.</p>

<p><code>$mday</code> is the day of the month and <code>$mon</code> the month in the range <code>0..11</code>, with 0 indicating January and 11 indicating December. This makes it easy to get a month name from a list:</p>

<pre><code>    my @abbr = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec);
    print &quot;$abbr[$mon] $mday&quot;;
    # $mon=9, $mday=18 gives &quot;Oct 18&quot;</code></pre>

<p><code>$year</code> contains the number of years since 1900. To get the full year write:</p>

<pre><code>    $year += 1900;</code></pre>

<p>To get the last two digits of the year (e.g., &quot;01&quot; in 2001) do:</p>

<pre><code>    $year = sprintf(&quot;%02d&quot;, $year % 100);</code></pre>

<p><code>$wday</code> is the day of the week, with 0 indicating Sunday and 3 indicating Wednesday. <code>$yday</code> is the day of the year, in the range <code>0..364</code> (or <code>0..365</code> in leap years.)</p>

<p><code>$isdst</code> is true if the specified time occurs when Daylight Saving Time is in effect, false otherwise.</p>

<p>If EXPR is omitted, <a href="CORE.html#localtime-EXPR"><code>localtime</code></a> uses the current time (as returned by <a href="CORE.html#time"><code>time</code></a>).</p>

<p>In scalar context, <a href="CORE.html#localtime-EXPR"><code>localtime</code></a> returns the <a href="http://man.he.net/man3/ctime">ctime(3)</a> value:</p>

<pre><code> my $now_string = localtime;  # e.g., &quot;Thu Oct 13 04:54:34 1994&quot;</code></pre>

<p>This scalar value is always in English, and is <b>not</b> locale-dependent. To get similar but locale-dependent date strings, try for example:</p>

<pre><code> use POSIX qw(strftime);
 my $now_string = strftime &quot;%a %b %e %H:%M:%S %Y&quot;, localtime;
 # or for GMT formatted appropriately for your locale:
 my $now_string = strftime &quot;%a %b %e %H:%M:%S %Y&quot;, gmtime;</code></pre>

<p>C$now_string&gt; will be formatted according to the current LC_TIME locale the program or thread is running in. See <a href="https://metacpan.org/pod/distribution/perl/pod/perllocale.pod">perllocale</a> for how to set up and change that locale. Note that <code>%a</code> and <code>%b</code>, the short forms of the day of the week and the month of the year, may not necessarily be three characters wide.</p>

<p>The <a href="https://metacpan.org/pod/Time::gmtime">Time::gmtime</a> and <a href="https://metacpan.org/pod/Time::localtime">Time::localtime</a> modules provide a convenient, by-name access mechanism to the <a href="CORE.html#gmtime-EXPR"><code>gmtime</code></a> and <a href="CORE.html#localtime-EXPR"><code>localtime</code></a> functions, respectively.</p>

<p>For a comprehensive date and time representation look at the <a href="../DateTime.html">DateTime</a> module on CPAN.</p>

<p>For GMT instead of local time use the <a href="CORE.html#gmtime-EXPR"><code>gmtime</code></a> builtin.</p>

<p>See also the <a href="https://metacpan.org/pod/Time::Local"><code>Time::Local</code></a> module (for converting seconds, minutes, hours, and such back to the integer value returned by <a href="CORE.html#time"><code>time</code></a>), and the <a href="https://metacpan.org/pod/distribution/perl/ext/POSIX/lib/POSIX.pod">POSIX</a> module&#39;s <a href="https://metacpan.org/pod/distribution/perl/ext/POSIX/lib/POSIX.pod#mktime"><code>mktime</code></a> function.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#localtime">&quot;localtime&quot; in perlport</a>.</p>

</dd>
<dt id="lock-THING"><a id="lock"></a>lock THING </dt>
<dd>

<p>This function places an advisory lock on a shared variable or referenced object contained in <i>THING</i> until the lock goes out of scope.</p>

<p>The value returned is the scalar itself, if the argument is a scalar, or a reference, if the argument is a hash, array or subroutine.</p>

<p><a href="CORE.html#lock-THING"><code>lock</code></a> is a &quot;weak keyword&quot;; this means that if you&#39;ve defined a function by this name (before any calls to it), that function will be called instead. If you are not under <code>use threads::shared</code> this does nothing. See <a href="https://metacpan.org/pod/threads::shared">threads::shared</a>.</p>

</dd>
<dt id="log-EXPR"><a id="log"></a>log EXPR     </dt>
<dd>

</dd>
<dt id="log1">log</dt>
<dd>

<p>Returns the natural logarithm (base <i>e</i>) of EXPR. If EXPR is omitted, returns the log of <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a>. To get the log of another base, use basic algebra: The base-N log of a number is equal to the natural log of that number divided by the natural log of N. For example:</p>

<pre><code>    sub log10 {
        my $n = shift;
        return log($n)/log(10);
    }</code></pre>

<p>See also <a href="CORE.html#exp-EXPR"><code>exp</code></a> for the inverse operation.</p>

</dd>
<dt id="lstat-FILEHANDLE"><a id="lstat"></a>lstat FILEHANDLE </dt>
<dd>

</dd>
<dt id="lstat-EXPR"><a id="lstat1"></a>lstat EXPR</dt>
<dd>

</dd>
<dt id="lstat-DIRHANDLE"><a id="lstat2"></a>lstat DIRHANDLE</dt>
<dd>

</dd>
<dt id="lstat3">lstat</dt>
<dd>

<p>Does the same thing as the <a href="CORE.html#stat-FILEHANDLE"><code>stat</code></a> function (including setting the special <code>_</code> filehandle) but stats a symbolic link instead of the file the symbolic link points to. If symbolic links are unimplemented on your system, a normal <a href="CORE.html#stat-FILEHANDLE"><code>stat</code></a> is done. For much more detailed information, please see the documentation for <a href="CORE.html#stat-FILEHANDLE"><code>stat</code></a>.</p>

<p>If EXPR is omitted, stats <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a>.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#lstat">&quot;lstat&quot; in perlport</a>.</p>

</dd>
<dt id="m//"><a id="m"></a>m//</dt>
<dd>

<p>The match operator. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlop.pod#Regexp-Quote-Like-Operators">&quot;Regexp Quote-Like Operators&quot; in perlop</a>.</p>

</dd>
<dt id="map-BLOCK-LIST"><a id="map"></a>map BLOCK LIST </dt>
<dd>

</dd>
<dt id="map-EXPR,LIST"><a id="map1"></a><a id="map-EXPR-LIST"></a>map EXPR,LIST</dt>
<dd>

<p>Evaluates the BLOCK or EXPR for each element of LIST (locally setting <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a> to each element) and composes a list of the results of each such evaluation. Each element of LIST may produce zero, one, or more elements in the generated list, so the number of elements in the generated list may differ from that in LIST. In scalar context, returns the total number of elements so generated. In list context, returns the generated list.</p>

<pre><code>    my @chars = map(chr, @numbers);</code></pre>

<p>translates a list of numbers to the corresponding characters.</p>

<pre><code>    my @squares = map { $_ * $_ } @numbers;</code></pre>

<p>translates a list of numbers to their squared values.</p>

<pre><code>    my @squares = map { $_ &gt; 5 ? ($_ * $_) : () } @numbers;</code></pre>

<p>shows that number of returned elements can differ from the number of input elements. To omit an element, return an empty list (). This could also be achieved by writing</p>

<pre><code>    my @squares = map { $_ * $_ } grep { $_ &gt; 5 } @numbers;</code></pre>

<p>which makes the intention more clear.</p>

<p>Map always returns a list, which can be assigned to a hash such that the elements become key/value pairs. See <a href="https://metacpan.org/pod/distribution/perl/pod/perldata.pod">perldata</a> for more details.</p>

<pre><code>    my %hash = map { get_a_key_for($_) =&gt; $_ } @array;</code></pre>

<p>is just a funny way to write</p>

<pre><code>    my %hash;
    foreach (@array) {
        $hash{get_a_key_for($_)} = $_;
    }</code></pre>

<p>Note that <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a> is an alias to the list value, so it can be used to modify the elements of the LIST. While this is useful and supported, it can cause bizarre results if the elements of LIST are not variables. Using a regular <code>foreach</code> loop for this purpose would be clearer in most cases. See also <a href="CORE.html#grep-BLOCK-LIST"><code>grep</code></a> for a list composed of those items of the original list for which the BLOCK or EXPR evaluates to true.</p>

<p><code>{</code> starts both hash references and blocks, so <code>map { ...</code> could be either the start of map BLOCK LIST or map EXPR, LIST. Because Perl doesn&#39;t look ahead for the closing <code>}</code> it has to take a guess at which it&#39;s dealing with based on what it finds just after the <code>{</code>. Usually it gets it right, but if it doesn&#39;t it won&#39;t realize something is wrong until it gets to the <code>}</code> and encounters the missing (or unexpected) comma. The syntax error will be reported close to the <code>}</code>, but you&#39;ll need to change something near the <code>{</code> such as using a unary <code>+</code> or semicolon to give Perl some help:</p>

<pre><code> my %hash = map {  &quot;\L$_&quot; =&gt; 1  } @array # perl guesses EXPR. wrong
 my %hash = map { +&quot;\L$_&quot; =&gt; 1  } @array # perl guesses BLOCK. right
 my %hash = map {; &quot;\L$_&quot; =&gt; 1  } @array # this also works
 my %hash = map { (&quot;\L$_&quot; =&gt; 1) } @array # as does this
 my %hash = map {  lc($_) =&gt; 1  } @array # and this.
 my %hash = map +( lc($_) =&gt; 1 ), @array # this is EXPR and works!

 my %hash = map  ( lc($_), 1 ),   @array # evaluates to (1, @array)</code></pre>

<p>or to force an anon hash constructor use <code>+{</code>:</p>

<pre><code>    my @hashes = map +{ lc($_) =&gt; 1 }, @array # EXPR, so needs
                                              # comma at end</code></pre>

<p>to get a list of anonymous hashes each with only one entry apiece.</p>

</dd>
<dt id="method-NAME-BLOCK"><a id="method"></a>method NAME BLOCK </dt>
<dd>

</dd>
<dt id="method-NAME-:-ATTRS-BLOCK"><a id="method1"></a>method NAME : ATTRS BLOCK</dt>
<dd>

<p>Creates a new named method in the scope of the class that it appears within. This is only valid inside a <a href="CORE.html#class-NAMESPACE"><code>class</code></a> declaration.</p>

</dd>
<dt id="mkdir-FILENAME,MODE"><a id="mkdir"></a><a id="mkdir-FILENAME-MODE"></a>mkdir FILENAME,MODE   </dt>
<dd>

</dd>
<dt id="mkdir-FILENAME"><a id="mkdir1"></a>mkdir FILENAME</dt>
<dd>

</dd>
<dt id="mkdir2">mkdir</dt>
<dd>

<p>Creates the directory specified by FILENAME, with permissions specified by MODE (as modified by <a href="CORE.html#umask-EXPR"><code>umask</code></a>). If it succeeds it returns true; otherwise it returns false and sets <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$!"><code>$!</code></a> (errno). MODE defaults to 0777 if omitted, and FILENAME defaults to <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a> if omitted.</p>

<p>In general, it is better to create directories with a permissive MODE and let the user modify that with their <a href="CORE.html#umask-EXPR"><code>umask</code></a> than it is to supply a restrictive MODE and give the user no way to be more permissive. The exceptions to this rule are when the file or directory should be kept private (mail files, for instance). The documentation for <a href="CORE.html#umask-EXPR"><code>umask</code></a> discusses the choice of MODE in more detail. If bits in MODE other than the permission bits are set, the result may be implementation defined, per POSIX 1003.1-2008.</p>

<p>Note that according to the POSIX 1003.1-1996 the FILENAME may have any number of trailing slashes. Some operating and filesystems do not get this right, so Perl automatically removes all trailing slashes to keep everyone happy.</p>

<p>To recursively create a directory structure, look at the <a href="https://metacpan.org/pod/File::Path#make_path(-$dir1,-$dir2,-....-)"><code>make_path</code></a> function of the <a href="https://metacpan.org/pod/File::Path">File::Path</a> module.</p>

</dd>
<dt id="msgctl-ID,CMD,ARG"><a id="msgctl"></a><a id="msgctl-ID-CMD-ARG"></a>msgctl ID,CMD,ARG </dt>
<dd>

<p>Calls the System V IPC function <a href="http://man.he.net/man2/msgctl">msgctl(2)</a>. You&#39;ll probably have to say</p>

<pre><code>    use IPC::SysV;</code></pre>

<p>first to get the correct constant definitions. If CMD is <code>IPC_STAT</code>, then ARG must be a variable that will hold the returned <code>msqid_ds</code> structure. Returns like <a href="CORE.html#ioctl-FILEHANDLE,FUNCTION,SCALAR"><code>ioctl</code></a>: the undefined value for error, <code>&quot;0 but true&quot;</code> for zero, or the actual return value otherwise. See also <a href="https://metacpan.org/pod/distribution/perl/pod/perlipc.pod#SysV-IPC">&quot;SysV IPC&quot; in perlipc</a> and the documentation for <a href="https://metacpan.org/pod/IPC::SysV"><code>IPC::SysV</code></a> and <a href="https://metacpan.org/pod/IPC::Semaphore"><code>IPC::Semaphore</code></a>.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#msgctl">&quot;msgctl&quot; in perlport</a>.</p>

</dd>
<dt id="msgget-KEY,FLAGS"><a id="msgget"></a><a id="msgget-KEY-FLAGS"></a>msgget KEY,FLAGS </dt>
<dd>

<p>Calls the System V IPC function <a href="http://man.he.net/man2/msgget">msgget(2)</a>. Returns the message queue id, or <a href="CORE.html#undef-EXPR"><code>undef</code></a> on error. See also <a href="https://metacpan.org/pod/distribution/perl/pod/perlipc.pod#SysV-IPC">&quot;SysV IPC&quot; in perlipc</a> and the documentation for <a href="https://metacpan.org/pod/IPC::SysV"><code>IPC::SysV</code></a> and <a href="https://metacpan.org/pod/IPC::Msg"><code>IPC::Msg</code></a>.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#msgget">&quot;msgget&quot; in perlport</a>.</p>

</dd>
<dt id="msgrcv-ID,VAR,SIZE,TYPE,FLAGS"><a id="msgrcv"></a><a id="msgrcv-ID-VAR-SIZE-TYPE-FLAGS"></a>msgrcv ID,VAR,SIZE,TYPE,FLAGS </dt>
<dd>

<p>Calls the System V IPC function msgrcv to receive a message from message queue ID into variable VAR with a maximum message size of SIZE. Note that when a message is received, the message type as a native long integer will be the first thing in VAR, followed by the actual message. This packing may be opened with <code>unpack(&quot;l! a*&quot;)</code>. Taints the variable. Returns true if successful, false on error. See also <a href="https://metacpan.org/pod/distribution/perl/pod/perlipc.pod#SysV-IPC">&quot;SysV IPC&quot; in perlipc</a> and the documentation for <a href="https://metacpan.org/pod/IPC::SysV"><code>IPC::SysV</code></a> and <a href="https://metacpan.org/pod/IPC::Msg"><code>IPC::Msg</code></a>.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#msgrcv">&quot;msgrcv&quot; in perlport</a>.</p>

</dd>
<dt id="msgsnd-ID,MSG,FLAGS"><a id="msgsnd"></a><a id="msgsnd-ID-MSG-FLAGS"></a>msgsnd ID,MSG,FLAGS </dt>
<dd>

<p>Calls the System V IPC function msgsnd to send the message MSG to the message queue ID. MSG must begin with the native long integer message type, followed by the message itself. This kind of packing can be achieved with <code>pack(&quot;l! a*&quot;, $type, $message)</code>. Returns true if successful, false on error. See also <a href="https://metacpan.org/pod/distribution/perl/pod/perlipc.pod#SysV-IPC">&quot;SysV IPC&quot; in perlipc</a> and the documentation for <a href="https://metacpan.org/pod/IPC::SysV"><code>IPC::SysV</code></a> and <a href="https://metacpan.org/pod/IPC::Msg"><code>IPC::Msg</code></a>.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#msgsnd">&quot;msgsnd&quot; in perlport</a>.</p>

</dd>
<dt id="my-VARLIST"><a id="my"></a>my VARLIST </dt>
<dd>

</dd>
<dt id="my-TYPE-VARLIST"><a id="my1"></a>my TYPE VARLIST</dt>
<dd>

</dd>
<dt id="my-VARLIST-:-ATTRS"><a id="my2"></a>my VARLIST : ATTRS</dt>
<dd>

</dd>
<dt id="my-TYPE-VARLIST-:-ATTRS"><a id="my3"></a>my TYPE VARLIST : ATTRS</dt>
<dd>

<p>A <a href="CORE.html#my-VARLIST"><code>my</code></a> declares the listed variables to be local (lexically) to the enclosing block, file, or <a href="CORE.html#eval-EXPR"><code>eval</code></a>. If more than one variable is listed, the list must be placed in parentheses.</p>

<p>Note that with a parenthesised list, <a href="CORE.html#undef-EXPR"><code>undef</code></a> can be used as a dummy placeholder, for example to skip assignment of initial values:</p>

<pre><code>    my ( undef, $min, $hour ) = localtime;</code></pre>

<p>Redeclaring a variable in the same scope or statement will &quot;shadow&quot; the previous declaration, creating a new instance and preventing access to the previous one. This is usually undesired and, if warnings are enabled, will result in a warning in the <code>shadow</code> category.</p>

<p>The exact semantics and interface of TYPE and ATTRS are still evolving. TYPE may be a bareword, a constant declared with <a href="https://metacpan.org/pod/constant"><code>use constant</code></a>, or <a href="CORE.html#__PACKAGE__"><code>__PACKAGE__</code></a>. It is currently bound to the use of the <a href="https://metacpan.org/pod/fields">fields</a> pragma, and attributes are handled using the <a href="https://metacpan.org/pod/attributes">attributes</a> pragma, or starting from Perl 5.8.0 also via the <a href="https://metacpan.org/pod/Attribute::Handlers">Attribute::Handlers</a> module. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlsub.pod#Private-Variables-via-my()">&quot;Private Variables via my()&quot; in perlsub</a> for details.</p>

</dd>
<dt id="next-LABEL"><a id="next"></a>next LABEL  </dt>
<dd>

</dd>
<dt id="next-EXPR"><a id="next1"></a>next EXPR</dt>
<dd>

</dd>
<dt id="next2">next</dt>
<dd>

<p>The <a href="CORE.html#next-LABEL"><code>next</code></a> command is like the <code>continue</code> statement in C; it starts the next iteration of the loop:</p>

<pre><code>    LINE: while (&lt;STDIN&gt;) {
        next LINE if /^#/;  # discard comments
        #...
    }</code></pre>

<p>Note that if there were a <a href="CORE.html#continue-BLOCK"><code>continue</code></a> block on the above, it would get executed even on discarded lines. If LABEL is omitted, the command refers to the innermost enclosing loop. The <code>next EXPR</code> form, available as of Perl 5.18.0, allows a label name to be computed at run time, being otherwise identical to <code>next LABEL</code>.</p>

<p><a href="CORE.html#next-LABEL"><code>next</code></a> cannot return a value from a block that typically returns a value, such as <code>eval {}</code>, <code>sub {}</code>, or <code>do {}</code>. It will perform its flow control behavior, which precludes any return value. It should not be used to exit a <a href="CORE.html#grep-BLOCK-LIST"><code>grep</code></a> or <a href="CORE.html#map-BLOCK-LIST"><code>map</code></a> operation.</p>

<p>Note that a block by itself is semantically identical to a loop that executes once. Thus <a href="CORE.html#next-LABEL"><code>next</code></a> will exit such a block early.</p>

<p>See also <a href="CORE.html#continue-BLOCK"><code>continue</code></a> for an illustration of how <a href="CORE.html#last-LABEL"><code>last</code></a>, <a href="CORE.html#next-LABEL"><code>next</code></a>, and <a href="CORE.html#redo-LABEL"><code>redo</code></a> work.</p>

<p>Unlike most named operators, this has the same precedence as assignment. It is also exempt from the looks-like-a-function rule, so <code>next (&quot;foo&quot;).&quot;bar&quot;</code> will cause &quot;bar&quot; to be part of the argument to <a href="CORE.html#next-LABEL"><code>next</code></a>.</p>

</dd>
<dt id="no-MODULE-VERSION-LIST"><a id="no"></a>no MODULE VERSION LIST  </dt>
<dd>

</dd>
<dt id="no-MODULE-VERSION"><a id="no1"></a>no MODULE VERSION</dt>
<dd>

</dd>
<dt id="no-MODULE-LIST"><a id="no2"></a>no MODULE LIST</dt>
<dd>

</dd>
<dt id="no-MODULE"><a id="no3"></a>no MODULE</dt>
<dd>

</dd>
<dt id="no-VERSION"><a id="no4"></a>no VERSION</dt>
<dd>

<p>See the <a href="CORE.html#use-Module-VERSION-LIST"><code>use</code></a> function, of which <a href="CORE.html#no-MODULE-VERSION-LIST"><code>no</code></a> is the opposite.</p>

</dd>
<dt id="oct-EXPR"><a id="oct"></a>oct EXPR      </dt>
<dd>

</dd>
<dt id="oct1">oct</dt>
<dd>

<p>Interprets EXPR as an octal string and returns the corresponding value. An octal string consists of octal digits and, as of Perl 5.33.5, an optional <code>0o</code> or <code>o</code> prefix. Each octal digit may be preceded by a single underscore, which will be ignored. (If EXPR happens to start off with <code>0x</code> or <code>x</code>, interprets it as a hex string. If EXPR starts off with <code>0b</code> or <code>b</code>, it is interpreted as a binary string. Leading whitespace is ignored in all three cases.) The following will handle decimal, binary, octal, and hex in standard Perl notation:</p>

<pre><code>    $val = oct($val) if $val =~ /^0/;</code></pre>

<p>If EXPR is omitted, uses <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a>. To go the other way (produce a number in octal), use <a href="CORE.html#sprintf-FORMAT,-LIST"><code>sprintf</code></a> or <a href="CORE.html#printf-FILEHANDLE-FORMAT,-LIST"><code>printf</code></a>:</p>

<pre><code>    my $dec_perms = (stat(&quot;filename&quot;))[2] &amp; 07777;
    my $oct_perm_str = sprintf &quot;%o&quot;, $perms;</code></pre>

<p>The <a href="CORE.html#oct-EXPR"><code>oct</code></a> function is commonly used when a string such as <code>644</code> needs to be converted into a file mode, for example. Although Perl automatically converts strings into numbers as needed, this automatic conversion assumes base 10.</p>

<p>Leading white space is ignored without warning, as too are any trailing non-digits, such as a decimal point (<a href="CORE.html#oct-EXPR"><code>oct</code></a> only handles non-negative integers, not negative integers or floating point).</p>

</dd>
<dt id="open-FILEHANDLE,MODE,EXPR"><a id="open"></a><a id="open-FILEHANDLE-MODE-EXPR"></a>open FILEHANDLE,MODE,EXPR    </dt>
<dd>

</dd>
<dt id="open-FILEHANDLE,MODE,EXPR,LIST"><a id="open1"></a><a id="open-FILEHANDLE-MODE-EXPR-LIST"></a>open FILEHANDLE,MODE,EXPR,LIST</dt>
<dd>

</dd>
<dt id="open-FILEHANDLE,MODE,REFERENCE"><a id="open2"></a><a id="open-FILEHANDLE-MODE-REFERENCE"></a>open FILEHANDLE,MODE,REFERENCE</dt>
<dd>

</dd>
<dt id="open-FILEHANDLE,EXPR"><a id="open3"></a><a id="open-FILEHANDLE-EXPR"></a>open FILEHANDLE,EXPR</dt>
<dd>

</dd>
<dt id="open-FILEHANDLE"><a id="open4"></a>open FILEHANDLE</dt>
<dd>

<p>Associates an internal FILEHANDLE with the external file specified by EXPR. That filehandle will subsequently allow you to perform I/O operations on that file, such as reading from it or writing to it.</p>

<p>Instead of a filename, you may specify an external command (plus an optional argument list) or a scalar reference, in order to open filehandles on commands or in-memory scalars, respectively.</p>

<p>A thorough reference to <code>open</code> follows. For a gentler introduction to the basics of <code>open</code>, see also the <a href="https://metacpan.org/pod/distribution/perl/pod/perlopentut.pod">perlopentut</a> manual page.</p>

<dl>

<dt id="Working-with-files"><a id="Working"></a>Working with files</dt>
<dd>

<p>Most often, <code>open</code> gets invoked with three arguments: the required FILEHANDLE (usually an empty scalar variable), followed by MODE (usually a literal describing the I/O mode the filehandle will use), and then the filename that the new filehandle will refer to.</p>

<dl>

<dt id="Simple-examples"><a id="Simple"></a>Simple examples</dt>
<dd>

<p>Reading from a file:</p>

<pre><code>    open(my $fh, &quot;&lt;&quot;, &quot;input.txt&quot;)
        or die &quot;Can&#39;t open &lt; input.txt: $!&quot;;

    # Process every line in input.txt
    while (my $line = readline($fh)) {
        #
        # ... do something interesting with $line here ...
        #
    }</code></pre>

<p>or writing to one:</p>

<pre><code>    open(my $fh, &quot;&gt;&quot;, &quot;output.txt&quot;)
        or die &quot;Can&#39;t open &gt; output.txt: $!&quot;;

    print $fh &quot;This line gets printed into output.txt.\n&quot;;</code></pre>

<p>For a summary of common filehandle operations such as these, see <a href="https://metacpan.org/pod/distribution/perl/pod/perlintro.pod#Files-and-I/O">&quot;Files and I/O&quot; in perlintro</a>.</p>

</dd>
<dt id="About-filehandles"><a id="About"></a>About filehandles</dt>
<dd>

<p>The first argument to <code>open</code>, labeled FILEHANDLE in this reference, is usually a scalar variable. (Exceptions exist, described in &quot;Other considerations&quot;, below.) If the call to <code>open</code> succeeds, then the expression provided as FILEHANDLE will get assigned an open <i>filehandle</i>. That filehandle provides an internal reference to the specified external file, conveniently stored in a Perl variable, and ready for I/O operations such as reading and writing.</p>

</dd>
<dt id="About-modes"><a id="About1"></a>About modes</dt>
<dd>

<p>When calling <code>open</code> with three or more arguments, the second argument -- labeled MODE here -- defines the <i>open mode</i>. MODE is usually a literal string comprising special characters that define the intended I/O role of the filehandle being created: whether it&#39;s read-only, or read-and-write, and so on.</p>

<p>If MODE is <code>&lt;</code>, the file is opened for input (read-only). If MODE is <code>&gt;</code>, the file is opened for output, with existing files first being truncated (&quot;clobbered&quot;) and nonexisting files newly created. If MODE is <code>&gt;&gt;</code>, the file is opened for appending, again being created if necessary.</p>

<p>You can put a <code>+</code> in front of the <code>&gt;</code> or <code>&lt;</code> to indicate that you want both read and write access to the file; thus <code>+&lt;</code> is almost always preferred for read/write updates--the <code>+&gt;</code> mode would clobber the file first. You can&#39;t usually use either read-write mode for updating textfiles, since they have variable-length records. See the <b>-i</b> switch in <a href="https://metacpan.org/pod/distribution/perl/pod/perlrun.pod#-i%5Bextension%5D">perlrun</a> for a better approach. The file is created with permissions of <code>0666</code> modified by the process&#39;s <a href="CORE.html#umask-EXPR"><code>umask</code></a> value.</p>

<p>These various prefixes correspond to the <a href="http://man.he.net/man3/fopen">fopen(3)</a> modes of <code>r</code>, <code>r+</code>, <code>w</code>, <code>w+</code>, <code>a</code>, and <code>a+</code>.</p>

<p>More examples of different modes in action:</p>

<pre><code> # Open a file for concatenation
 open(my $log, &quot;&gt;&gt;&quot;, &quot;/usr/spool/news/twitlog&quot;)
     or warn &quot;Couldn&#39;t open log file; discarding input&quot;;

 # Open a file for reading and writing
 open(my $dbase, &quot;+&lt;&quot;, &quot;dbase.mine&quot;)
     or die &quot;Can&#39;t open &#39;dbase.mine&#39; for update: $!&quot;;</code></pre>

</dd>
<dt id="Checking-the-return-value"><a id="Checking"></a>Checking the return value</dt>
<dd>

<p>Open returns nonzero on success, the undefined value otherwise. If the <code>open</code> involved a pipe, the return value happens to be the pid of the subprocess.</p>

<p>When opening a file, it&#39;s seldom a good idea to continue if the request failed, so <code>open</code> is frequently used with <a href="CORE.html#die-LIST"><code>die</code></a>. Even if you want your code to do something other than <code>die</code> on a failed open, you should still always check the return value from opening a file.</p>

</dd>
</dl>

</dd>
<dt id="Specifying-I/O-layers-in-MODE"><a id="Specifying"></a><a id="Specifying-I-O-layers-in-MODE"></a>Specifying I/O layers in MODE</dt>
<dd>

<p>You can use the three-argument form of open to specify I/O layers (sometimes referred to as &quot;disciplines&quot;) to apply to the new filehandle. These affect how the input and output are processed (see <a href="https://metacpan.org/pod/open">open</a> and <a href="https://metacpan.org/pod/PerlIO">PerlIO</a> for more details). For example:</p>

<pre><code>    # loads PerlIO::encoding automatically
    open(my $fh, &quot;&lt;:encoding(UTF-8)&quot;, $filename)
        || die &quot;Can&#39;t open UTF-8 encoded $filename: $!&quot;;</code></pre>

<p>This opens the UTF8-encoded file containing Unicode characters; see <a href="https://metacpan.org/pod/distribution/perl/pod/perluniintro.pod">perluniintro</a>. Note that if layers are specified in the three-argument form, then default layers stored in <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$%7B%5EOPEN%7D"><code>${^OPEN}</code></a> (usually set by the <a href="https://metacpan.org/pod/open">open</a> pragma or the switch <code>-CioD</code>) are ignored. Those layers will also be ignored if you specify a colon with no name following it. In that case the default layer for the operating system (:raw on Unix, :crlf on Windows) is used.</p>

<p>On some systems (in general, DOS- and Windows-based systems) <a href="CORE.html#binmode-FILEHANDLE,-LAYER"><code>binmode</code></a> is necessary when you&#39;re not working with a text file. For the sake of portability it is a good idea always to use it when appropriate, and never to use it when it isn&#39;t appropriate. Also, people can set their I/O to be by default UTF8-encoded Unicode, not bytes.</p>

</dd>
<dt id="Using-undef-for-temporary-files"><a id="Using"></a>Using <code>undef</code> for temporary files</dt>
<dd>

<p>As a special case the three-argument form with a read/write mode and the third argument being <a href="CORE.html#undef-EXPR"><code>undef</code></a>:</p>

<pre><code>    open(my $tmp, &quot;+&gt;&quot;, undef) or die ...</code></pre>

<p>opens a filehandle to a newly created empty anonymous temporary file. (This happens under any mode, which makes <code>+&gt;</code> the only useful and sensible mode to use.) You will need to <a href="CORE.html#seek-FILEHANDLE,POSITION,WHENCE"><code>seek</code></a> to do the reading.</p>

</dd>
<dt id="Opening-a-filehandle-into-an-in-memory-scalar"><a id="Opening"></a>Opening a filehandle into an in-memory scalar</dt>
<dd>

<p>You can open filehandles directly to Perl scalars instead of a file or other resource external to the program. To do so, provide a reference to that scalar as the third argument to <code>open</code>, like so:</p>

<pre><code> open(my $memory, &quot;&gt;&quot;, \$var)
     or die &quot;Can&#39;t open memory file: $!&quot;;
 print $memory &quot;foo!\n&quot;;    # output will appear in $var</code></pre>

<p>To (re)open <code>STDOUT</code> or <code>STDERR</code> as an in-memory file, close it first:</p>

<pre><code>    close STDOUT;
    open(STDOUT, &quot;&gt;&quot;, \$variable)
        or die &quot;Can&#39;t open STDOUT: $!&quot;;</code></pre>

<p>The scalars for in-memory files are treated as octet strings: unless the file is being opened with truncation the scalar may not contain any code points over 0xFF.</p>

<p>Opening in-memory files <i>can</i> fail for a variety of reasons. As with any other <code>open</code>, check the return value for success.</p>

<p><i>Technical note</i>: This feature works only when Perl is built with PerlIO -- the default, except with older (pre-5.16) Perl installations that were configured to not include it (e.g. via <code>Configure -Uuseperlio</code>). You can see whether your Perl was built with PerlIO by running <code>perl -V:useperlio</code>. If it says <code>&#39;define&#39;</code>, you have PerlIO; otherwise you don&#39;t.</p>

<p>See <a href="https://metacpan.org/pod/distribution/perl/pod/perliol.pod">perliol</a> for detailed info on PerlIO.</p>

</dd>
<dt id="Opening-a-filehandle-into-a-command"><a id="Opening1"></a>Opening a filehandle into a command</dt>
<dd>

<p>If MODE is <code>|-</code>, then the filename is interpreted as a command to which output is to be piped, and if MODE is <code>-|</code>, the filename is interpreted as a command that pipes output to us. In the two-argument (and one-argument) form, one should replace dash (<code>-</code>) with the command. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlipc.pod#Using-open()-for-IPC">&quot;Using open() for IPC&quot; in perlipc</a> for more examples of this. (You are not allowed to <a href="CORE.html#open-FILEHANDLE,MODE,EXPR"><code>open</code></a> to a command that pipes both in <i>and</i> out, but see <a href="https://metacpan.org/pod/IPC::Open2">IPC::Open2</a>, <a href="https://metacpan.org/pod/IPC::Open3">IPC::Open3</a>, and <a href="https://metacpan.org/pod/distribution/perl/pod/perlipc.pod#Bidirectional-Communication-with-Another-Process">&quot;Bidirectional Communication with Another Process&quot; in perlipc</a> for alternatives.)</p>

<pre><code> open(my $article_fh, &quot;-|&quot;, &quot;caesar &lt;$article&quot;)  # decrypt
                                                 # article
     or die &quot;Can&#39;t start caesar: $!&quot;;

 open(my $article_fh, &quot;caesar &lt;$article |&quot;)      # ditto
     or die &quot;Can&#39;t start caesar: $!&quot;;

 open(my $out_fh, &quot;|-&quot;, &quot;sort &gt;Tmp$$&quot;)    # $$ is our process id
     or die &quot;Can&#39;t start sort: $!&quot;;</code></pre>

<p>In the form of pipe opens taking three or more arguments, if LIST is specified (extra arguments after the command name) then LIST becomes arguments to the command invoked if the platform supports it. The meaning of <a href="CORE.html#open-FILEHANDLE,MODE,EXPR"><code>open</code></a> with more than three arguments for non-pipe modes is not yet defined, but experimental &quot;layers&quot; may give extra LIST arguments meaning.</p>

<p>If you open a pipe on the command <code>-</code> (that is, specify either <code>|-</code> or <code>-|</code> with the one- or two-argument forms of <a href="CORE.html#open-FILEHANDLE,MODE,EXPR"><code>open</code></a>), an implicit <a href="CORE.html#fork"><code>fork</code></a> is done, so <a href="CORE.html#open-FILEHANDLE,MODE,EXPR"><code>open</code></a> returns twice: in the parent process it returns the pid of the child process, and in the child process it returns (a defined) <code>0</code>. Use <code>defined($pid)</code> or <code>//</code> to determine whether the open was successful.</p>

<p>For example, use either</p>

<pre><code>   my $child_pid = open(my $from_kid, &quot;-|&quot;)
        // die &quot;Can&#39;t fork: $!&quot;;</code></pre>

<p>or</p>

<pre><code>   my $child_pid = open(my $to_kid,   &quot;|-&quot;)
        // die &quot;Can&#39;t fork: $!&quot;;</code></pre>

<p>followed by</p>

<pre><code>    if ($child_pid) {
        # am the parent:
        # either write $to_kid or else read $from_kid
        ...
       waitpid $child_pid, 0;
    } else {
        # am the child; use STDIN/STDOUT normally
        ...
        exit;
    }</code></pre>

<p>The filehandle behaves normally for the parent, but I/O to that filehandle is piped from/to the STDOUT/STDIN of the child process. In the child process, the filehandle isn&#39;t opened--I/O happens from/to the new STDOUT/STDIN. Typically this is used like the normal piped open when you want to exercise more control over just how the pipe command gets executed, such as when running setuid and you don&#39;t want to have to scan shell commands for metacharacters.</p>

<p>The following blocks are more or less equivalent:</p>

<pre><code>    open(my $fh, &quot;|tr &#39;[a-z]&#39; &#39;[A-Z]&#39;&quot;);
    open(my $fh, &quot;|-&quot;, &quot;tr &#39;[a-z]&#39; &#39;[A-Z]&#39;&quot;);
    open(my $fh, &quot;|-&quot;) || exec &#39;tr&#39;, &#39;[a-z]&#39;, &#39;[A-Z]&#39;;
    open(my $fh, &quot;|-&quot;, &quot;tr&quot;, &#39;[a-z]&#39;, &#39;[A-Z]&#39;);

    open(my $fh, &quot;cat -n &#39;$file&#39;|&quot;);
    open(my $fh, &quot;-|&quot;, &quot;cat -n &#39;$file&#39;&quot;);
    open(my $fh, &quot;-|&quot;) || exec &quot;cat&quot;, &quot;-n&quot;, $file;
    open(my $fh, &quot;-|&quot;, &quot;cat&quot;, &quot;-n&quot;, $file);</code></pre>

<p>The last two examples in each block show the pipe as &quot;list form&quot;, which is not yet supported on all platforms. (If your platform has a real <a href="CORE.html#fork"><code>fork</code></a>, such as Linux and macOS, you can use the list form; it also works on Windows with Perl 5.22 or later.) You would want to use the list form of the pipe so you can pass literal arguments to the command without risk of the shell interpreting any shell metacharacters in them. However, this also bars you from opening pipes to commands that intentionally contain shell metacharacters, such as:</p>

<pre><code>    open(my $fh, &quot;|cat -n | expand -4 | lpr&quot;)
        || die &quot;Can&#39;t open pipeline to lpr: $!&quot;;</code></pre>

<p>See <a href="https://metacpan.org/pod/distribution/perl/pod/perlipc.pod#Safe-Pipe-Opens">&quot;Safe Pipe Opens&quot; in perlipc</a> for more examples of this.</p>

</dd>
<dt id="Duping-filehandles"><a id="Duping"></a>Duping filehandles</dt>
<dd>

<p>You may also, in the Bourne shell tradition, specify an EXPR beginning with <code>&gt;&amp;</code>, in which case the rest of the string is interpreted as the name of a filehandle (or file descriptor, if numeric) to be duped (as in <a href="http://man.he.net/man2/dup">dup(2)</a>) and opened. You may use <code>&amp;</code> after <code>&gt;</code>, <code>&gt;&gt;</code>, <code>&lt;</code>, <code>+&gt;</code>, <code>+&gt;&gt;</code>, and <code>+&lt;</code>. The mode you specify should match the mode of the original filehandle. (Duping a filehandle does not take into account any existing contents of IO buffers.) If you use the three-argument form, then you can pass either a number, the name of a filehandle, or the normal &quot;reference to a glob&quot;.</p>

<p>Here is a script that saves, redirects, and restores <code>STDOUT</code> and <code>STDERR</code> using various methods:</p>

<pre><code>    #!/usr/bin/perl
    open(my $oldout, &quot;&gt;&amp;STDOUT&quot;)
        or die &quot;Can&#39;t dup STDOUT: $!&quot;;
    open(OLDERR,     &quot;&gt;&amp;&quot;, \*STDERR)
        or die &quot;Can&#39;t dup STDERR: $!&quot;;

    open(STDOUT, &#39;&gt;&#39;, &quot;foo.out&quot;)
        or die &quot;Can&#39;t redirect STDOUT: $!&quot;;
    open(STDERR, &quot;&gt;&amp;STDOUT&quot;)
        or die &quot;Can&#39;t dup STDOUT: $!&quot;;

    select STDERR; $| = 1;  # make unbuffered
    select STDOUT; $| = 1;  # make unbuffered

    print STDOUT &quot;stdout 1\n&quot;;  # this works for
    print STDERR &quot;stderr 1\n&quot;;  # subprocesses too

    open(STDOUT, &quot;&gt;&amp;&quot;, $oldout)
        or die &quot;Can&#39;t dup \$oldout: $!&quot;;
    open(STDERR, &quot;&gt;&amp;OLDERR&quot;)
        or die &quot;Can&#39;t dup OLDERR: $!&quot;;

    print STDOUT &quot;stdout 2\n&quot;;
    print STDERR &quot;stderr 2\n&quot;;</code></pre>

<p>If you specify <code>&#39;&lt;&amp;=X&#39;</code>, where <code>X</code> is a file descriptor number or a filehandle, then Perl will do an equivalent of C&#39;s <a href="http://man.he.net/man3/fdopen">fdopen(3)</a> of that file descriptor (and not call <a href="http://man.he.net/man2/dup">dup(2)</a>); this is more parsimonious of file descriptors. For example:</p>

<pre><code>    # open for input, reusing the fileno of $fd
    open(my $fh, &quot;&lt;&amp;=&quot;, $fd)</code></pre>

<p>or</p>

<pre><code>    open(my $fh, &quot;&lt;&amp;=$fd&quot;)</code></pre>

<p>or</p>

<pre><code>    # open for append, using the fileno of $oldfh
    open(my $fh, &quot;&gt;&gt;&amp;=&quot;, $oldfh)</code></pre>

<p>Being parsimonious on filehandles is also useful (besides being parsimonious) for example when something is dependent on file descriptors, like for example locking using <a href="CORE.html#flock-FILEHANDLE,OPERATION"><code>flock</code></a>. If you do just <code>open(my $A, &quot;&gt;&gt;&amp;&quot;, $B)</code>, the filehandle <code>$A</code> will not have the same file descriptor as <code>$B</code>, and therefore <code>flock($A)</code> will not <code>flock($B)</code> nor vice versa. But with <code>open(my $A, &quot;&gt;&gt;&amp;=&quot;, $B)</code>, the filehandles will share the same underlying system file descriptor.</p>

<p>Note that under Perls older than 5.8.0, Perl uses the standard C library&#39;s&#39; <a href="http://man.he.net/man3/fdopen">fdopen(3)</a> to implement the <code>=</code> functionality. On many Unix systems, <a href="http://man.he.net/man3/fdopen">fdopen(3)</a> fails when file descriptors exceed a certain value, typically 255. For Perls 5.8.0 and later, PerlIO is (most often) the default.</p>

</dd>
<dt id="Legacy-usage"><a id="Legacy"></a>Legacy usage</dt>
<dd>

<p>This section describes ways to call <code>open</code> outside of best practices; you may encounter these uses in older code. Perl does not consider their use deprecated, exactly, but neither is it recommended in new code, for the sake of clarity and readability.</p>

<dl>

<dt id="Specifying-mode-and-filename-as-a-single-argument"><a id="Specifying1"></a>Specifying mode and filename as a single argument</dt>
<dd>

<p>In the one- and two-argument forms of the call, the mode and filename should be concatenated (in that order), preferably separated by white space. You can--but shouldn&#39;t--omit the mode in these forms when that mode is <code>&lt;</code>. It is safe to use the two-argument form of <a href="CORE.html#open-FILEHANDLE,MODE,EXPR"><code>open</code></a> if the filename argument is a known literal.</p>

<pre><code> open(my $dbase, &quot;+&lt;dbase.mine&quot;)          # ditto
     or die &quot;Can&#39;t open &#39;dbase.mine&#39; for update: $!&quot;;</code></pre>

<p>In the two-argument (and one-argument) form, opening <code>&lt;-</code> or <code>-</code> opens STDIN and opening <code>&gt;-</code> opens STDOUT.</p>

<p>New code should favor the three-argument form of <code>open</code> over this older form. Declaring the mode and the filename as two distinct arguments avoids any confusion between the two.</p>

</dd>
<dt id="Calling-open-with-one-argument-via-global-variables"><a id="Calling"></a>Calling <code>open</code> with one argument via global variables</dt>
<dd>

<p>As a shortcut, a one-argument call takes the filename from the global scalar variable of the same name as the filehandle:</p>

<pre><code>    $ARTICLE = 100;
    open(ARTICLE)
        or die &quot;Can&#39;t find article $ARTICLE: $!\n&quot;;</code></pre>

<p>Here <code>$ARTICLE</code> must be a global (package) scalar variable - not one declared with <a href="CORE.html#my-VARLIST"><code>my</code></a> or <a href="CORE.html#state-VARLIST"><code>state</code></a>.</p>

</dd>
<dt id="Assigning-a-filehandle-to-a-bareword"><a id="Assigning"></a>Assigning a filehandle to a bareword</dt>
<dd>

<p>An older style is to use a bareword as the filehandle, as</p>

<pre><code>    open(FH, &quot;&lt;&quot;, &quot;input.txt&quot;)
       or die &quot;Can&#39;t open &lt; input.txt: $!&quot;;</code></pre>

<p>Then you can use <code>FH</code> as the filehandle, in <code>close FH</code> and <code>&lt;FH&gt;</code> and so on. Note that it&#39;s a global variable, so this form is not recommended when dealing with filehandles other than Perl&#39;s built-in ones (e.g. STDOUT and STDIN). In fact, using a bareword for the filehandle is an error when the <code>bareword_filehandles</code> feature has been disabled. This feature is disabled by default when in the scope of <code>use v5.36.0</code> or later.</p>

</dd>
</dl>

</dd>
<dt id="Other-considerations"><a id="Other"></a>Other considerations</dt>
<dd>

<dl>

<dt id="Automatic-filehandle-closure"><a id="Automatic"></a>Automatic filehandle closure</dt>
<dd>

<p>The filehandle will be closed when its reference count reaches zero. If it is a lexically scoped variable declared with <a href="CORE.html#my-VARLIST"><code>my</code></a>, that usually means the end of the enclosing scope. However, this automatic close does not check for errors, so it is better to explicitly close filehandles, especially those used for writing:</p>

<pre><code>    close($handle)
       || warn &quot;close failed: $!&quot;;</code></pre>

</dd>
<dt id="Automatic-pipe-flushing"><a id="Automatic1"></a>Automatic pipe flushing</dt>
<dd>

<p>Perl will attempt to flush all files opened for output before any operation that may do a fork, but this may not be supported on some platforms (see <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod">perlport</a>). To be safe, you may need to set <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$%7C"><code>$|</code></a> (<code>$AUTOFLUSH</code> in <a href="https://metacpan.org/pod/English">English</a>) or call the <code>autoflush</code> method of <a href="https://metacpan.org/pod/IO::Handle#METHODS"><code>IO::Handle</code></a> on any open handles.</p>

<p>On systems that support a close-on-exec flag on files, the flag will be set for the newly opened file descriptor as determined by the value of <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$%5EF"><code>$^F</code></a>. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$%5EF">&quot;$^F&quot; in perlvar</a>.</p>

<p>Closing any piped filehandle causes the parent process to wait for the child to finish, then returns the status value in <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$?"><code>$?</code></a> and <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$%7B%5ECHILD_ERROR_NATIVE%7D"><code>${^CHILD_ERROR_NATIVE}</code></a>.</p>

</dd>
<dt id="Direct-versus-by-reference-assignment-of-filehandles"><a id="Direct"></a>Direct versus by-reference assignment of filehandles</dt>
<dd>

<p>If FILEHANDLE -- the first argument in a call to <code>open</code> -- is an undefined scalar variable (or array or hash element), a new filehandle is autovivified, meaning that the variable is assigned a reference to a newly allocated anonymous filehandle. Otherwise if FILEHANDLE is an expression, its value is the real filehandle. (This is considered a symbolic reference, so <code>use strict &quot;refs&quot;</code> should <i>not</i> be in effect.)</p>

</dd>
<dt id="Whitespace-and-special-characters-in-the-filename-argument"><a id="Whitespace"></a>Whitespace and special characters in the filename argument</dt>
<dd>

<p>The filename passed to the one- and two-argument forms of <a href="CORE.html#open-FILEHANDLE,MODE,EXPR"><code>open</code></a> will have leading and trailing whitespace deleted and normal redirection characters honored. This property, known as &quot;magic open&quot;, can often be used to good effect. A user could specify a filename of <i>&quot;rsh cat file |&quot;</i>, or you could change certain filenames as needed:</p>

<pre><code>    $filename =~ s/(.*\.gz)\s*$/gzip -dc &lt; $1|/;
    open(my $fh, $filename)
        or die &quot;Can&#39;t open $filename: $!&quot;;</code></pre>

<p>Use the three-argument form to open a file with arbitrary weird characters in it,</p>

<pre><code>    open(my $fh, &quot;&lt;&quot;, $file)
        || die &quot;Can&#39;t open $file: $!&quot;;</code></pre>

<p>otherwise it&#39;s necessary to protect any leading and trailing whitespace:</p>

<pre><code>    $file =~ s#^(\s)#./$1#;
    open(my $fh, &quot;&lt; $file\0&quot;)
        || die &quot;Can&#39;t open $file: $!&quot;;</code></pre>

<p>(this may not work on some bizarre filesystems). One should conscientiously choose between the <i>magic</i> and <i>three-argument</i> form of <a href="CORE.html#open-FILEHANDLE,MODE,EXPR"><code>open</code></a>:</p>

<pre><code>    open(my $in, $ARGV[0]) || die &quot;Can&#39;t open $ARGV[0]: $!&quot;;</code></pre>

<p>will allow the user to specify an argument of the form <code>&quot;rsh cat file |&quot;</code>, but will not work on a filename that happens to have a trailing space, while</p>

<pre><code>    open(my $in, &quot;&lt;&quot;, $ARGV[0])
        || die &quot;Can&#39;t open $ARGV[0]: $!&quot;;</code></pre>

<p>will have exactly the opposite restrictions. (However, some shells support the syntax <code>perl your_program.pl &lt;( rsh cat file )</code>, which produces a filename that can be opened normally.)</p>

</dd>
<dt id="Invoking-C-style-open"><a id="Invoking"></a>Invoking C-style <code>open</code></dt>
<dd>

<p>If you want a &quot;real&quot; C <a href="http://man.he.net/man2/open">open(2)</a>, then you should use the <a href="CORE.html#sysopen-FILEHANDLE,FILENAME,MODE"><code>sysopen</code></a> function, which involves no such magic (but uses different filemodes than Perl <a href="CORE.html#open-FILEHANDLE,MODE,EXPR"><code>open</code></a>, which corresponds to C <a href="http://man.he.net/man3/fopen">fopen(3)</a>). This is another way to protect your filenames from interpretation. For example:</p>

<pre><code>    use IO::Handle;
    sysopen(my $fh, $path, O_RDWR|O_CREAT|O_EXCL)
        or die &quot;Can&#39;t open $path: $!&quot;;
    $fh-&gt;autoflush(1);
    print $fh &quot;stuff $$\n&quot;;
    seek($fh, 0, 0);
    print &quot;File contains: &quot;, readline($fh);</code></pre>

<p>See <a href="CORE.html#seek-FILEHANDLE,POSITION,WHENCE"><code>seek</code></a> for some details about mixing reading and writing.</p>

</dd>
<dt id="Portability-issues"><a id="Portability1"></a>Portability issues</dt>
<dd>

<p>See <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#open">&quot;open&quot; in perlport</a>.</p>

</dd>
</dl>

</dd>
</dl>

</dd>
<dt id="opendir-DIRHANDLE,EXPR"><a id="opendir"></a><a id="opendir-DIRHANDLE-EXPR"></a>opendir DIRHANDLE,EXPR </dt>
<dd>

<p>Opens a directory named EXPR for processing by <a href="CORE.html#readdir-DIRHANDLE"><code>readdir</code></a>, <a href="CORE.html#telldir-DIRHANDLE"><code>telldir</code></a>, <a href="CORE.html#seekdir-DIRHANDLE,POS"><code>seekdir</code></a>, <a href="CORE.html#rewinddir-DIRHANDLE"><code>rewinddir</code></a>, and <a href="CORE.html#closedir-DIRHANDLE"><code>closedir</code></a>. Returns true if successful. DIRHANDLE may be an expression whose value can be used as an indirect dirhandle, usually the real dirhandle name. If DIRHANDLE is an undefined scalar variable (or array or hash element), the variable is assigned a reference to a new anonymous dirhandle; that is, it&#39;s autovivified. Dirhandles are the same objects as filehandles; an I/O object can only be open as one of these handle types at once.</p>

<p>See the example at <a href="CORE.html#readdir-DIRHANDLE"><code>readdir</code></a>.</p>

</dd>
<dt id="ord-EXPR"><a id="ord"></a>ord EXPR  </dt>
<dd>

</dd>
<dt id="ord1">ord</dt>
<dd>

<p>Returns the numeric value of the first character of EXPR. If EXPR is an empty string, returns 0. If EXPR is omitted, uses <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a>. (Note <i>character</i>, not byte.)</p>

<p>For the reverse, see <a href="CORE.html#chr-NUMBER"><code>chr</code></a>. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlunicode.pod">perlunicode</a> for more about Unicode.</p>

</dd>
<dt id="our-VARLIST"><a id="our"></a>our VARLIST  </dt>
<dd>

</dd>
<dt id="our-TYPE-VARLIST"><a id="our1"></a>our TYPE VARLIST</dt>
<dd>

</dd>
<dt id="our-VARLIST-:-ATTRS"><a id="our2"></a>our VARLIST : ATTRS</dt>
<dd>

</dd>
<dt id="our-TYPE-VARLIST-:-ATTRS"><a id="our3"></a>our TYPE VARLIST : ATTRS</dt>
<dd>

<p><a href="CORE.html#our-VARLIST"><code>our</code></a> makes a lexical alias to a package (i.e. global) variable of the same name in the current package for use within the current lexical scope.</p>

<p><a href="CORE.html#our-VARLIST"><code>our</code></a> has the same scoping rules as <a href="CORE.html#my-VARLIST"><code>my</code></a> or <a href="CORE.html#state-VARLIST"><code>state</code></a>, meaning that it is only valid within a lexical scope. Unlike <a href="CORE.html#my-VARLIST"><code>my</code></a> and <a href="CORE.html#state-VARLIST"><code>state</code></a>, which both declare new (lexical) variables, <a href="CORE.html#our-VARLIST"><code>our</code></a> only creates an alias to an existing variable: a package variable of the same name.</p>

<p>This means that when <code>use strict &#39;vars&#39;</code> is in effect, <a href="CORE.html#our-VARLIST"><code>our</code></a> lets you use a package variable without qualifying it with the package name, but only within the lexical scope of the <a href="CORE.html#our-VARLIST"><code>our</code></a> declaration. This applies immediately--even within the same statement.</p>

<pre><code>    package Foo;
    use v5.36;  # which implies &quot;use strict;&quot;

    $Foo::foo = 23;

    {
        our $foo;   # alias to $Foo::foo
        print $foo; # prints 23
    }

    print $Foo::foo; # prints 23

    print $foo; # ERROR: requires explicit package name</code></pre>

<p>This works even if the package variable has not been used before, as package variables spring into existence when first used.</p>

<pre><code>    package Foo;
    use v5.36;

    our $foo = 23;   # just like $Foo::foo = 23

    print $Foo::foo; # prints 23</code></pre>

<p>Because the variable becomes legal immediately under <code>use strict &#39;vars&#39;</code>, so long as there is no variable with that name is already in scope, you can then reference the package variable again even within the same statement.</p>

<pre><code>    package Foo;
    use v5.36;

    my  $foo = $foo; # error, undeclared $foo on right-hand side
    our $foo = $foo; # no errors</code></pre>

<p>If more than one variable is listed, the list must be placed in parentheses.</p>

<pre><code>    our($bar, $baz);</code></pre>

<p>An <a href="CORE.html#our-VARLIST"><code>our</code></a> declaration declares an alias for a package variable that will be visible across its entire lexical scope, even across package boundaries. The package in which the variable is entered is determined at the point of the declaration, not at the point of use. This means the following behavior holds:</p>

<pre><code>    package Foo;
    our $bar;      # declares $Foo::bar for rest of lexical scope
    $bar = 20;

    package Bar;
    print $bar;    # prints 20, as it refers to $Foo::bar</code></pre>

<p>Multiple <a href="CORE.html#our-VARLIST"><code>our</code></a> declarations with the same name in the same lexical scope are allowed if they are in different packages. If they happen to be in the same package, Perl will emit warnings if you have asked for them, just like multiple <a href="CORE.html#my-VARLIST"><code>my</code></a> declarations. Unlike a second <a href="CORE.html#my-VARLIST"><code>my</code></a> declaration, which will bind the name to a fresh variable, a second <a href="CORE.html#our-VARLIST"><code>our</code></a> declaration in the same package, in the same scope, is merely redundant.</p>

<pre><code>    use warnings;
    package Foo;
    our $bar;      # declares $Foo::bar for rest of lexical scope
    $bar = 20;

    package Bar;
    our $bar = 30; # declares $Bar::bar for rest of lexical scope
    print $bar;    # prints 30

    our $bar;      # emits warning but has no other effect
    print $bar;    # still prints 30</code></pre>

<p>An <a href="CORE.html#our-VARLIST"><code>our</code></a> declaration may also have a list of attributes associated with it.</p>

<p>The exact semantics and interface of TYPE and ATTRS are still evolving. TYPE is currently bound to the use of the <a href="https://metacpan.org/pod/fields">fields</a> pragma, and attributes are handled using the <a href="https://metacpan.org/pod/attributes">attributes</a> pragma, or, starting from Perl 5.8.0, also via the <a href="https://metacpan.org/pod/Attribute::Handlers">Attribute::Handlers</a> module. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlsub.pod#Private-Variables-via-my()">&quot;Private Variables via my()&quot; in perlsub</a> for details.</p>

<p>Note that with a parenthesised list, <a href="CORE.html#undef-EXPR"><code>undef</code></a> can be used as a dummy placeholder, for example to skip assignment of initial values:</p>

<pre><code>    our ( undef, $min, $hour ) = localtime;</code></pre>

<p><a href="CORE.html#our-VARLIST"><code>our</code></a> differs from <a href="https://metacpan.org/pod/vars"><code>use vars</code></a>, which allows use of an unqualified name <i>only</i> within the affected package, but across scopes.</p>

</dd>
<dt id="pack-TEMPLATE,LIST"><a id="pack"></a><a id="pack-TEMPLATE-LIST"></a>pack TEMPLATE,LIST </dt>
<dd>

<p>Takes a LIST of values and converts it into a string using the rules given by the TEMPLATE. The resulting string is the concatenation of the converted values. Typically, each converted value looks like its machine-level representation. For example, on 32-bit machines an integer may be represented by a sequence of 4 bytes, which will in Perl be presented as a string that&#39;s 4 characters long.</p>

<p>See <a href="https://metacpan.org/pod/distribution/perl/pod/perlpacktut.pod">perlpacktut</a> for an introduction to this function.</p>

<p>The TEMPLATE is a sequence of characters that give the order and type of values, as follows:</p>

<pre><code>    a  A string with arbitrary binary data, will be null padded.
    A  A text (ASCII) string, will be space padded.
    Z  A null-terminated (ASCIZ) string, will be null padded.

    b  A bit string (ascending bit order inside each byte,
       like vec()).
    B  A bit string (descending bit order inside each byte).
    h  A hex string (low nybble first).
    H  A hex string (high nybble first).

    c  A signed char (8-bit) value.
    C  An unsigned char (octet) value.
    W  An unsigned char value (can be greater than 255).

    s  A signed short (16-bit) value.
    S  An unsigned short value.

    l  A signed long (32-bit) value.
    L  An unsigned long value.

    q  A signed quad (64-bit) value.
    Q  An unsigned quad value.
         (Quads are available only if your system supports 64-bit
          integer values _and_ if Perl has been compiled to support
          those.  Raises an exception otherwise.)

    i  A signed integer value.
    I  An unsigned integer value.
         (This &#39;integer&#39; is _at_least_ 32 bits wide.  Its exact
          size depends on what a local C compiler calls &#39;int&#39;.)

    n  An unsigned short (16-bit) in &quot;network&quot; (big-endian) order.
    N  An unsigned long (32-bit) in &quot;network&quot; (big-endian) order.
    v  An unsigned short (16-bit) in &quot;VAX&quot; (little-endian) order.
    V  An unsigned long (32-bit) in &quot;VAX&quot; (little-endian) order.

    j  A Perl internal signed integer value (IV).
    J  A Perl internal unsigned integer value (UV).

    f  A single-precision float in native format.
    d  A double-precision float in native format.

    F  A Perl internal floating-point value (NV) in native format
    D  A float of long-double precision in native format.
         (Long doubles are available only if your system supports
          long double values. Raises an exception otherwise.
          Note that there are different long double formats.)

    p  A pointer to a null-terminated string.
    P  A pointer to a structure (fixed-length string).

    u  A uuencoded string.
    U  A Unicode character number.  Encodes to a character in char-
       acter mode and UTF-8 (or UTF-EBCDIC in EBCDIC platforms) in
       byte mode.  Also on EBCDIC platforms, the character number will
       be the native EBCDIC value for character numbers below 256.
       This allows most programs using this feature to not have to
       care which type of platform they are running on.

    w  A BER compressed integer (not an ASN.1 BER, see perlpacktut
       for details).  Its bytes represent an unsigned integer in
       base 128, most significant digit first, with as few digits
       as possible.  Bit eight (the high bit) is set on each byte
       except the last.

    x  A null byte (a.k.a ASCII NUL, &quot;\000&quot;, chr(0))
    X  Back up a byte.
    @  Null-fill or truncate to absolute position, counted from the
       start of the innermost ()-group.
    .  Null-fill or truncate to absolute position specified by
       the value.
    (  Start of a ()-group.</code></pre>

<p>One or more modifiers below may optionally follow certain letters in the TEMPLATE (the second column lists letters for which the modifier is valid):</p>

<pre><code>    !   sSlLiI     Forces native (short, long, int) sizes instead
                   of fixed (16-/32-bit) sizes.

    !   xX         Make x and X act as alignment commands.

    !   nNvV       Treat integers as signed instead of unsigned.

    !   @.         Specify position as byte offset in the internal
                   representation of the packed string.  Efficient
                   but dangerous.

    &gt;   sSiIlLqQ   Force big-endian byte-order on the type.
        jJfFdDpP   (The &quot;big end&quot; touches the construct.)

    &lt;   sSiIlLqQ   Force little-endian byte-order on the type.
        jJfFdDpP   (The &quot;little end&quot; touches the construct.)</code></pre>

<p>The <code>&gt;</code> and <code>&lt;</code> modifiers can also be used on <code>()</code> groups to force a particular byte-order on all components in that group, including all its subgroups.</p>

<p>The following rules apply:</p>

<ul>

<li><p>Each letter may optionally be followed by a number indicating the repeat count. A numeric repeat count may optionally be enclosed in brackets, as in <code>pack(&quot;C[80]&quot;, @arr)</code>. The repeat count gobbles that many values from the LIST when used with all format types other than <code>a</code>, <code>A</code>, <code>Z</code>, <code>b</code>, <code>B</code>, <code>h</code>, <code>H</code>, <code>@</code>, <code>.</code>, <code>x</code>, <code>X</code>, and <code>P</code>, where it means something else, described below. Supplying a <code>*</code> for the repeat count instead of a number means to use however many items are left, except for:</p>

<ul>

<li><p><code>@</code>, <code>x</code>, and <code>X</code>, where it is equivalent to <code>0</code>.</p>

</li>
<li><p>&lt;.&gt;, where it means relative to the start of the string.</p>

</li>
<li><p><code>u</code>, where it is equivalent to 1 (or 45, which here is equivalent).</p>

</li>
</ul>

<p>One can replace a numeric repeat count with a template letter enclosed in brackets to use the packed byte length of the bracketed template for the repeat count.</p>

<p>For example, the template <code>x[L]</code> skips as many bytes as in a packed long, and the template <code>&quot;$t X[$t] $t&quot;</code> unpacks twice whatever $t (when variable-expanded) unpacks. If the template in brackets contains alignment commands (such as <code>x![d]</code>), its packed length is calculated as if the start of the template had the maximal possible alignment.</p>

<p>When used with <code>Z</code>, a <code>*</code> as the repeat count is guaranteed to add a trailing null byte, so the resulting string is always one byte longer than the byte length of the item itself.</p>

<p>When used with <code>@</code>, the repeat count represents an offset from the start of the innermost <code>()</code> group.</p>

<p>When used with <code>.</code>, the repeat count determines the starting position to calculate the value offset as follows:</p>

<ul>

<li><p>If the repeat count is <code>0</code>, it&#39;s relative to the current position.</p>

</li>
<li><p>If the repeat count is <code>*</code>, the offset is relative to the start of the packed string.</p>

</li>
<li><p>And if it&#39;s an integer <i>n</i>, the offset is relative to the start of the <i>n</i>th innermost <code>( )</code> group, or to the start of the string if <i>n</i> is bigger then the group level.</p>

</li>
</ul>

<p>The repeat count for <code>u</code> is interpreted as the maximal number of bytes to encode per line of output, with 0, 1 and 2 replaced by 45. The repeat count should not be more than 65.</p>

</li>
<li><p>The <code>a</code>, <code>A</code>, and <code>Z</code> types gobble just one value, but pack it as a string of length count, padding with nulls or spaces as needed. When unpacking, <code>A</code> strips trailing whitespace and nulls, <code>Z</code> strips everything after the first null, and <code>a</code> returns data with no stripping at all.</p>

<p>If the value to pack is too long, the result is truncated. If it&#39;s too long and an explicit count is provided, <code>Z</code> packs only <code>$count-1</code> bytes, followed by a null byte. Thus <code>Z</code> always packs a trailing null, except when the count is 0.</p>

</li>
<li><p>Likewise, the <code>b</code> and <code>B</code> formats pack a string that&#39;s that many bits long. Each such format generates 1 bit of the result. These are typically followed by a repeat count like <code>B8</code> or <code>B64</code>.</p>

<p>Each result bit is based on the least-significant bit of the corresponding input character, i.e., on <code>ord($char)%2</code>. In particular, characters <code>&quot;0&quot;</code> and <code>&quot;1&quot;</code> generate bits 0 and 1, as do characters <code>&quot;\000&quot;</code> and <code>&quot;\001&quot;</code>.</p>

<p>Starting from the beginning of the input string, each 8-tuple of characters is converted to 1 character of output. With format <code>b</code>, the first character of the 8-tuple determines the least-significant bit of a character; with format <code>B</code>, it determines the most-significant bit of a character.</p>

<p>If the length of the input string is not evenly divisible by 8, the remainder is packed as if the input string were padded by null characters at the end. Similarly during unpacking, &quot;extra&quot; bits are ignored.</p>

<p>If the input string is longer than needed, remaining characters are ignored.</p>

<p>A <code>*</code> for the repeat count uses all characters of the input field. On unpacking, bits are converted to a string of <code>0</code>s and <code>1</code>s.</p>

</li>
<li><p>The <code>h</code> and <code>H</code> formats pack a string that many nybbles (4-bit groups, representable as hexadecimal digits, <code>&quot;0&quot;..&quot;9&quot;</code> <code>&quot;a&quot;..&quot;f&quot;</code>) long.</p>

<p>For each such format, <a href="CORE.html#pack-TEMPLATE,LIST"><code>pack</code></a> generates 4 bits of result. With non-alphabetical characters, the result is based on the 4 least-significant bits of the input character, i.e., on <code>ord($char)%16</code>. In particular, characters <code>&quot;0&quot;</code> and <code>&quot;1&quot;</code> generate nybbles 0 and 1, as do bytes <code>&quot;\000&quot;</code> and <code>&quot;\001&quot;</code>. For characters <code>&quot;a&quot;..&quot;f&quot;</code> and <code>&quot;A&quot;..&quot;F&quot;</code>, the result is compatible with the usual hexadecimal digits, so that <code>&quot;a&quot;</code> and <code>&quot;A&quot;</code> both generate the nybble <code>0xA==10</code>. Use only these specific hex characters with this format.</p>

<p>Starting from the beginning of the template to <a href="CORE.html#pack-TEMPLATE,LIST"><code>pack</code></a>, each pair of characters is converted to 1 character of output. With format <code>h</code>, the first character of the pair determines the least-significant nybble of the output character; with format <code>H</code>, it determines the most-significant nybble.</p>

<p>If the length of the input string is not even, it behaves as if padded by a null character at the end. Similarly, &quot;extra&quot; nybbles are ignored during unpacking.</p>

<p>If the input string is longer than needed, extra characters are ignored.</p>

<p>A <code>*</code> for the repeat count uses all characters of the input field. For <a href="CORE.html#unpack-TEMPLATE,EXPR"><code>unpack</code></a>, nybbles are converted to a string of hexadecimal digits.</p>

</li>
<li><p>The <code>p</code> format packs a pointer to a null-terminated string. You are responsible for ensuring that the string is not a temporary value, as that could potentially get deallocated before you got around to using the packed result. The <code>P</code> format packs a pointer to a structure of the size indicated by the length. A null pointer is created if the corresponding value for <code>p</code> or <code>P</code> is <a href="CORE.html#undef-EXPR"><code>undef</code></a>; similarly with <a href="CORE.html#unpack-TEMPLATE,EXPR"><code>unpack</code></a>, where a null pointer unpacks into <a href="CORE.html#undef-EXPR"><code>undef</code></a>.</p>

<p>If your system has a strange pointer size--meaning a pointer is neither as big as an int nor as big as a long--it may not be possible to pack or unpack pointers in big- or little-endian byte order. Attempting to do so raises an exception.</p>

</li>
<li><p>The <code>/</code> template character allows packing and unpacking of a sequence of items where the packed structure contains a packed item count followed by the packed items themselves. This is useful when the structure you&#39;re unpacking has encoded the sizes or repeat counts for some of its fields within the structure itself as separate fields.</p>

<p>For <a href="CORE.html#pack-TEMPLATE,LIST"><code>pack</code></a>, you write <i>length-item</i><code>/</code><i>sequence-item</i>, and the <i>length-item</i> describes how the length value is packed. Formats likely to be of most use are integer-packing ones like <code>n</code> for Java strings, <code>w</code> for ASN.1 or SNMP, and <code>N</code> for Sun XDR.</p>

<p>For <a href="CORE.html#pack-TEMPLATE,LIST"><code>pack</code></a>, <i>sequence-item</i> may have a repeat count, in which case the minimum of that and the number of available items is used as the argument for <i>length-item</i>. If it has no repeat count or uses a &#39;*&#39;, the number of available items is used.</p>

<p>For <a href="CORE.html#unpack-TEMPLATE,EXPR"><code>unpack</code></a>, an internal stack of integer arguments unpacked so far is used. You write <code>/</code><i>sequence-item</i> and the repeat count is obtained by popping off the last element from the stack. The <i>sequence-item</i> must not have a repeat count.</p>

<p>If <i>sequence-item</i> refers to a string type (<code>&quot;A&quot;</code>, <code>&quot;a&quot;</code>, or <code>&quot;Z&quot;</code>), the <i>length-item</i> is the string length, not the number of strings. With an explicit repeat count for pack, the packed string is adjusted to that length. For example:</p>

<pre><code> This code:                             gives this result:

 unpack(&quot;W/a&quot;, &quot;\004Gurusamy&quot;)          (&quot;Guru&quot;)
 unpack(&quot;a3/A A*&quot;, &quot;007 Bond  J &quot;)      (&quot; Bond&quot;, &quot;J&quot;)
 unpack(&quot;a3 x2 /A A*&quot;, &quot;007: Bond, J.&quot;) (&quot;Bond, J&quot;, &quot;.&quot;)

 pack(&quot;n/a* w/a&quot;,&quot;hello,&quot;,&quot;world&quot;)     &quot;\000\006hello,\005world&quot;
 pack(&quot;a/W2&quot;, ord(&quot;a&quot;) .. ord(&quot;z&quot;))    &quot;2ab&quot;</code></pre>

<p>The <i>length-item</i> is not returned explicitly from <a href="CORE.html#unpack-TEMPLATE,EXPR"><code>unpack</code></a>.</p>

<p>Supplying a count to the <i>length-item</i> format letter is only useful with <code>A</code>, <code>a</code>, or <code>Z</code>. Packing with a <i>length-item</i> of <code>a</code> or <code>Z</code> may introduce <code>&quot;\000&quot;</code> characters, which Perl does not regard as legal in numeric strings.</p>

</li>
<li><p>The integer types <code>s</code>, <code>S</code>, <code>l</code>, and <code>L</code> may be followed by a <code>!</code> modifier to specify native shorts or longs. As shown in the example above, a bare <code>l</code> means exactly 32 bits, although the native <code>long</code> as seen by the local C compiler may be larger. This is mainly an issue on 64-bit platforms. You can see whether using <code>!</code> makes any difference this way:</p>

<pre><code>    printf &quot;format s is %d, s! is %d\n&quot;,
        length pack(&quot;s&quot;), length pack(&quot;s!&quot;);

    printf &quot;format l is %d, l! is %d\n&quot;,
        length pack(&quot;l&quot;), length pack(&quot;l!&quot;);</code></pre>

<p><code>i!</code> and <code>I!</code> are also allowed, but only for completeness&#39; sake: they are identical to <code>i</code> and <code>I</code>.</p>

<p>The actual sizes (in bytes) of native shorts, ints, longs, and long longs on the platform where Perl was built are also available from the command line:</p>

<pre><code>    $ perl -V:{short,int,long{,long}}size
    shortsize=&#39;2&#39;;
    intsize=&#39;4&#39;;
    longsize=&#39;4&#39;;
    longlongsize=&#39;8&#39;;</code></pre>

<p>or programmatically via the <a href="https://metacpan.org/pod/Config"><code>Config</code></a> module:</p>

<pre><code>       use Config;
       print $Config{shortsize},    &quot;\n&quot;;
       print $Config{intsize},      &quot;\n&quot;;
       print $Config{longsize},     &quot;\n&quot;;
       print $Config{longlongsize}, &quot;\n&quot;;</code></pre>

<p><code>$Config{longlongsize}</code> is undefined on systems without long long support.</p>

</li>
<li><p>The integer formats <code>s</code>, <code>S</code>, <code>i</code>, <code>I</code>, <code>l</code>, <code>L</code>, <code>j</code>, and <code>J</code> are inherently non-portable between processors and operating systems because they obey native byteorder and endianness. For example, a 4-byte integer 0x12345678 (305419896 decimal) would be ordered natively (arranged in and handled by the CPU registers) into bytes as</p>

<pre><code>    0x12 0x34 0x56 0x78  # big-endian
    0x78 0x56 0x34 0x12  # little-endian</code></pre>

<p>Basically, Intel and VAX CPUs are little-endian, while everybody else, including Motorola m68k/88k, PPC, Sparc, HP PA, Power, and Cray, are big-endian. Alpha and MIPS can be either: Digital/Compaq uses (well, used) them in little-endian mode, but SGI/Cray uses them in big-endian mode.</p>

<p>The names <i>big-endian</i> and <i>little-endian</i> are comic references to the egg-eating habits of the little-endian Lilliputians and the big-endian Blefuscudians from the classic Jonathan Swift satire, <i>Gulliver&#39;s Travels</i>. This entered computer lingo via the paper &quot;On Holy Wars and a Plea for Peace&quot; by Danny Cohen, USC/ISI IEN 137, April 1, 1980.</p>

<p>Some systems may have even weirder byte orders such as</p>

<pre><code>   0x56 0x78 0x12 0x34
   0x34 0x12 0x78 0x56</code></pre>

<p>These are called mid-endian, middle-endian, mixed-endian, or just weird.</p>

<p>You can determine your system endianness with this incantation:</p>

<pre><code>   printf(&quot;%#02x &quot;, $_) for unpack(&quot;W*&quot;, pack L=&gt;0x12345678);</code></pre>

<p>The byteorder on the platform where Perl was built is also available via <a href="https://metacpan.org/pod/Config">Config</a>:</p>

<pre><code>    use Config;
    print &quot;$Config{byteorder}\n&quot;;</code></pre>

<p>or from the command line:</p>

<pre><code>    $ perl -V:byteorder</code></pre>

<p>Byteorders <code>&quot;1234&quot;</code> and <code>&quot;12345678&quot;</code> are little-endian; <code>&quot;4321&quot;</code> and <code>&quot;87654321&quot;</code> are big-endian. Systems with multiarchitecture binaries will have <code>&quot;ffff&quot;</code>, signifying that static information doesn&#39;t work, one must use runtime probing.</p>

<p>For portably packed integers, either use the formats <code>n</code>, <code>N</code>, <code>v</code>, and <code>V</code> or else use the <code>&gt;</code> and <code>&lt;</code> modifiers described immediately below. See also <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod">perlport</a>.</p>

</li>
<li><p>Also floating point numbers have endianness. Usually (but not always) this agrees with the integer endianness. Even though most platforms these days use the IEEE 754 binary format, there are differences, especially if the long doubles are involved. You can see the <code>Config</code> variables <code>doublekind</code> and <code>longdblkind</code> (also <code>doublesize</code>, <code>longdblsize</code>): the &quot;kind&quot; values are enums, unlike <code>byteorder</code>.</p>

<p>Portability-wise the best option is probably to keep to the IEEE 754 64-bit doubles, and of agreed-upon endianness. Another possibility is the <code>&quot;%a&quot;</code>) format of <a href="CORE.html#printf-FILEHANDLE-FORMAT,-LIST"><code>printf</code></a>.</p>

</li>
<li><p>Starting with Perl 5.10.0, integer and floating-point formats, along with the <code>p</code> and <code>P</code> formats and <code>()</code> groups, may all be followed by the <code>&gt;</code> or <code>&lt;</code> endianness modifiers to respectively enforce big- or little-endian byte-order. These modifiers are especially useful given how <code>n</code>, <code>N</code>, <code>v</code>, and <code>V</code> don&#39;t cover signed integers, 64-bit integers, or floating-point values.</p>

<p>Here are some concerns to keep in mind when using an endianness modifier:</p>

<ul>

<li><p>Exchanging signed integers between different platforms works only when all platforms store them in the same format. Most platforms store signed integers in two&#39;s-complement notation, so usually this is not an issue.</p>

</li>
<li><p>The <code>&gt;</code> or <code>&lt;</code> modifiers can only be used on floating-point formats on big- or little-endian machines. Otherwise, attempting to use them raises an exception.</p>

</li>
<li><p>Forcing big- or little-endian byte-order on floating-point values for data exchange can work only if all platforms use the same binary representation such as IEEE floating-point. Even if all platforms are using IEEE, there may still be subtle differences. Being able to use <code>&gt;</code> or <code>&lt;</code> on floating-point values can be useful, but also dangerous if you don&#39;t know exactly what you&#39;re doing. It is not a general way to portably store floating-point values.</p>

</li>
<li><p>When using <code>&gt;</code> or <code>&lt;</code> on a <code>()</code> group, this affects all types inside the group that accept byte-order modifiers, including all subgroups. It is silently ignored for all other types. You are not allowed to override the byte-order within a group that already has a byte-order modifier suffix.</p>

</li>
</ul>

</li>
<li><p>Real numbers (floats and doubles) are in native machine format only. Due to the multiplicity of floating-point formats and the lack of a standard &quot;network&quot; representation for them, no facility for interchange has been made. This means that packed floating-point data written on one machine may not be readable on another, even if both use IEEE floating-point arithmetic (because the endianness of the memory representation is not part of the IEEE spec). See also <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod">perlport</a>.</p>

<p>If you know <i>exactly</i> what you&#39;re doing, you can use the <code>&gt;</code> or <code>&lt;</code> modifiers to force big- or little-endian byte-order on floating-point values.</p>

<p>Because Perl uses doubles (or long doubles, if configured) internally for all numeric calculation, converting from double into float and thence to double again loses precision, so <code>unpack(&quot;f&quot;, pack(&quot;f&quot;, $foo)</code>) will not in general equal $foo.</p>

</li>
<li><p>Pack and unpack can operate in two modes: character mode (<code>C0</code> mode) where the packed string is processed per character, and UTF-8 byte mode (<code>U0</code> mode) where the packed string is processed in its UTF-8-encoded Unicode form on a byte-by-byte basis. Character mode is the default unless the format string starts with <code>U</code>. You can always switch mode mid-format with an explicit <code>C0</code> or <code>U0</code> in the format. This mode remains in effect until the next mode change, or until the end of the <code>()</code> group it (directly) applies to.</p>

<p>Using <code>C0</code> to get Unicode characters while using <code>U0</code> to get <i>non</i>-Unicode bytes is not necessarily obvious. Probably only the first of these is what you want:</p>

<pre><code>    $ perl -CS -E &#39;say &quot;\x{3B1}\x{3C9}&quot;&#39; |
      perl -CS -ne &#39;printf &quot;%v04X\n&quot;, $_ for unpack(&quot;C0A*&quot;, $_)&#39;
    03B1.03C9
    $ perl -CS -E &#39;say &quot;\x{3B1}\x{3C9}&quot;&#39; |
      perl -CS -ne &#39;printf &quot;%v02X\n&quot;, $_ for unpack(&quot;U0A*&quot;, $_)&#39;
    CE.B1.CF.89
    $ perl -CS -E &#39;say &quot;\x{3B1}\x{3C9}&quot;&#39; |
      perl -C0 -ne &#39;printf &quot;%v02X\n&quot;, $_ for unpack(&quot;C0A*&quot;, $_)&#39;
    CE.B1.CF.89
    $ perl -CS -E &#39;say &quot;\x{3B1}\x{3C9}&quot;&#39; |
      perl -C0 -ne &#39;printf &quot;%v02X\n&quot;, $_ for unpack(&quot;U0A*&quot;, $_)&#39;
    C3.8E.C2.B1.C3.8F.C2.89</code></pre>

<p>Those examples also illustrate that you should not try to use <a href="CORE.html#pack-TEMPLATE,LIST"><code>pack</code></a>/<a href="CORE.html#unpack-TEMPLATE,EXPR"><code>unpack</code></a> as a substitute for the <a href="https://metacpan.org/pod/Encode">Encode</a> module.</p>

</li>
<li><p>You must yourself do any alignment or padding by inserting, for example, enough <code>&quot;x&quot;</code>es while packing. There is no way for <a href="CORE.html#pack-TEMPLATE,LIST"><code>pack</code></a> and <a href="CORE.html#unpack-TEMPLATE,EXPR"><code>unpack</code></a> to know where characters are going to or coming from, so they handle their output and input as flat sequences of characters.</p>

</li>
<li><p>A <code>()</code> group is a sub-TEMPLATE enclosed in parentheses. A group may take a repeat count either as postfix, or for <a href="CORE.html#unpack-TEMPLATE,EXPR"><code>unpack</code></a>, also via the <code>/</code> template character. Within each repetition of a group, positioning with <code>@</code> starts over at 0. Therefore, the result of</p>

<pre><code>    pack(&quot;@1A((@2A)@3A)&quot;, qw[X Y Z])</code></pre>

<p>is the string <code>&quot;\0X\0\0YZ&quot;</code>.</p>

</li>
<li><p><code>x</code> and <code>X</code> accept the <code>!</code> modifier to act as alignment commands: they jump forward or back to the closest position aligned at a multiple of <code>count</code> characters. For example, to <a href="CORE.html#pack-TEMPLATE,LIST"><code>pack</code></a> or <a href="CORE.html#unpack-TEMPLATE,EXPR"><code>unpack</code></a> a C structure like</p>

<pre><code>    struct {
        char   c;    /* one signed, 8-bit character */
        double d;
        char   cc[2];
    }</code></pre>

<p>one may need to use the template <code>c x![d] d c[2]</code>. This assumes that doubles must be aligned to the size of double.</p>

<p>For alignment commands, a <code>count</code> of 0 is equivalent to a <code>count</code> of 1; both are no-ops.</p>

</li>
<li><p><code>n</code>, <code>N</code>, <code>v</code> and <code>V</code> accept the <code>!</code> modifier to represent signed 16-/32-bit integers in big-/little-endian order. This is portable only when all platforms sharing packed data use the same binary representation for signed integers; for example, when all platforms use two&#39;s-complement representation.</p>

</li>
<li><p>Comments can be embedded in a TEMPLATE using <code>#</code> through the end of line. White space can separate pack codes from each other, but modifiers and repeat counts must follow immediately. Breaking complex templates into individual line-by-line components, suitably annotated, can do as much to improve legibility and maintainability of pack/unpack formats as <code>/x</code> can for complicated pattern matches.</p>

</li>
<li><p>If TEMPLATE requires more arguments than <a href="CORE.html#pack-TEMPLATE,LIST"><code>pack</code></a> is given, <a href="CORE.html#pack-TEMPLATE,LIST"><code>pack</code></a> assumes additional <code>&quot;&quot;</code> arguments. If TEMPLATE requires fewer arguments than given, extra arguments are ignored.</p>

</li>
<li><p>Attempting to pack the special floating point values <code>Inf</code> and <code>NaN</code> (infinity, also in negative, and not-a-number) into packed integer values (like <code>&quot;L&quot;</code>) is a fatal error. The reason for this is that there simply isn&#39;t any sensible mapping for these special values into integers.</p>

</li>
</ul>

<p>Examples:</p>

<pre><code>    $foo = pack(&quot;WWWW&quot;,65,66,67,68);
    # foo eq &quot;ABCD&quot;
    $foo = pack(&quot;W4&quot;,65,66,67,68);
    # same thing
    $foo = pack(&quot;W4&quot;,0x24b6,0x24b7,0x24b8,0x24b9);
    # same thing with Unicode circled letters.
    $foo = pack(&quot;U4&quot;,0x24b6,0x24b7,0x24b8,0x24b9);
    # same thing with Unicode circled letters.  You don&#39;t get the
    # UTF-8 bytes because the U at the start of the format caused
    # a switch to U0-mode, so the UTF-8 bytes get joined into
    # characters
    $foo = pack(&quot;C0U4&quot;,0x24b6,0x24b7,0x24b8,0x24b9);
    # foo eq &quot;\xe2\x92\xb6\xe2\x92\xb7\xe2\x92\xb8\xe2\x92\xb9&quot;
    # This is the UTF-8 encoding of the string in the
    # previous example

    $foo = pack(&quot;ccxxcc&quot;,65,66,67,68);
    # foo eq &quot;AB\0\0CD&quot;

    # NOTE: The examples above featuring &quot;W&quot; and &quot;c&quot; are true
    # only on ASCII and ASCII-derived systems such as ISO Latin 1
    # and UTF-8.  On EBCDIC systems, the first example would be
    #      $foo = pack(&quot;WWWW&quot;,193,194,195,196);

    $foo = pack(&quot;s2&quot;,1,2);
    # &quot;\001\000\002\000&quot; on little-endian
    # &quot;\000\001\000\002&quot; on big-endian

    $foo = pack(&quot;a4&quot;,&quot;abcd&quot;,&quot;x&quot;,&quot;y&quot;,&quot;z&quot;);
    # &quot;abcd&quot;

    $foo = pack(&quot;aaaa&quot;,&quot;abcd&quot;,&quot;x&quot;,&quot;y&quot;,&quot;z&quot;);
    # &quot;axyz&quot;

    $foo = pack(&quot;a14&quot;,&quot;abcdefg&quot;);
    # &quot;abcdefg\0\0\0\0\0\0\0&quot;

    $foo = pack(&quot;i9pl&quot;, gmtime);
    # a real struct tm (on my system anyway)

    $utmp_template = &quot;Z8 Z8 Z16 L&quot;;
    $utmp = pack($utmp_template, @utmp1);
    # a struct utmp (BSDish)

    @utmp2 = unpack($utmp_template, $utmp);
    # &quot;@utmp1&quot; eq &quot;@utmp2&quot;

    sub bintodec {
        unpack(&quot;N&quot;, pack(&quot;B32&quot;, substr(&quot;0&quot; x 32 . shift, -32)));
    }

    $foo = pack(&#39;sx2l&#39;, 12, 34);
    # short 12, two zero bytes padding, long 34
    $bar = pack(&#39;s@4l&#39;, 12, 34);
    # short 12, zero fill to position 4, long 34
    # $foo eq $bar
    $baz = pack(&#39;s.l&#39;, 12, 4, 34);
    # short 12, zero fill to position 4, long 34

    $foo = pack(&#39;nN&#39;, 42, 4711);
    # pack big-endian 16- and 32-bit unsigned integers
    $foo = pack(&#39;S&gt;L&gt;&#39;, 42, 4711);
    # exactly the same
    $foo = pack(&#39;s&lt;l&lt;&#39;, -42, 4711);
    # pack little-endian 16- and 32-bit signed integers
    $foo = pack(&#39;(sl)&lt;&#39;, -42, 4711);
    # exactly the same</code></pre>

<p>The same template may generally also be used in <a href="CORE.html#unpack-TEMPLATE,EXPR"><code>unpack</code></a>.</p>

</dd>
<dt id="package-NAMESPACE"><a id="package"></a>package NAMESPACE</dt>
<dd>

</dd>
<dt id="package-NAMESPACE-VERSION"><a id="package1"></a>package NAMESPACE VERSION    </dt>
<dd>

</dd>
<dt id="package-NAMESPACE-BLOCK"><a id="package2"></a>package NAMESPACE BLOCK</dt>
<dd>

</dd>
<dt id="package-NAMESPACE-VERSION-BLOCK"><a id="package3"></a>package NAMESPACE VERSION BLOCK    </dt>
<dd>

<p>Declares the BLOCK or the rest of the compilation unit as being in the given namespace. The scope of the package declaration is either the supplied code BLOCK or, in the absence of a BLOCK, from the declaration itself through the end of current scope (the enclosing block, file, or <a href="CORE.html#eval-EXPR"><code>eval</code></a>). That is, the forms without a BLOCK are operative through the end of the current scope, just like the <a href="CORE.html#my-VARLIST"><code>my</code></a>, <a href="CORE.html#state-VARLIST"><code>state</code></a>, and <a href="CORE.html#our-VARLIST"><code>our</code></a> operators. All unqualified dynamic identifiers in this scope will be in the given namespace, except where overridden by another <a href="CORE.html#package-NAMESPACE"><code>package</code></a> declaration or when they&#39;re one of the special identifiers that qualify into <code>main::</code>, like <code>STDOUT</code>, <code>ARGV</code>, <code>ENV</code>, and the punctuation variables.</p>

<p>A package statement affects dynamic variables only, including those you&#39;ve used <a href="CORE.html#local-EXPR"><code>local</code></a> on, but <i>not</i> lexically-scoped variables, which are created with <a href="CORE.html#my-VARLIST"><code>my</code></a>, <a href="CORE.html#state-VARLIST"><code>state</code></a>, or <a href="CORE.html#our-VARLIST"><code>our</code></a>. Typically it would be the first declaration in a file included by <a href="CORE.html#require-VERSION"><code>require</code></a> or <a href="CORE.html#use-Module-VERSION-LIST"><code>use</code></a>. You can switch into a package in more than one place, since this only determines which default symbol table the compiler uses for the rest of that block. You can refer to identifiers in other packages than the current one by prefixing the identifier with the package name and a double colon, as in <code>$SomePack::var</code> or <code>ThatPack::INPUT_HANDLE</code>. If package name is omitted, the <code>main</code> package is assumed. That is, <code>$::sail</code> is equivalent to <code>$main::sail</code> (as well as to <code>$main&#39;sail</code>, still seen in ancient code, mostly from Perl 4).</p>

<p>If VERSION is provided, <a href="CORE.html#package-NAMESPACE"><code>package</code></a> sets the <code>$VERSION</code> variable in the given namespace to a <a href="https://metacpan.org/pod/version">version</a> object with the VERSION provided. VERSION must be a &quot;strict&quot; style version number as defined by the <a href="https://metacpan.org/pod/version">version</a> module: a positive decimal number (integer or decimal-fraction) without exponentiation or else a dotted-decimal v-string with a leading &#39;v&#39; character and at least three components. You should set <code>$VERSION</code> only once per package.</p>

<p>See <a href="https://metacpan.org/pod/distribution/perl/pod/perlmod.pod#Packages">&quot;Packages&quot; in perlmod</a> for more information about packages, modules, and classes. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlsub.pod">perlsub</a> for other scoping issues.</p>

</dd>
<dt id="__PACKAGE__"><a id="PACKAGE__"></a>__PACKAGE__ </dt>
<dd>

<p>A special token that returns the name of the package in which it occurs.</p>

</dd>
<dt id="pipe-READHANDLE,WRITEHANDLE"><a id="pipe"></a><a id="pipe-READHANDLE-WRITEHANDLE"></a>pipe READHANDLE,WRITEHANDLE </dt>
<dd>

<p>Opens a pair of connected pipes like the corresponding system call. Note that if you set up a loop of piped processes, deadlock can occur unless you are very careful. In addition, note that Perl&#39;s pipes use IO buffering, so you may need to set <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$%7C"><code>$|</code></a> to flush your WRITEHANDLE after each command, depending on the application.</p>

<p>Returns true on success.</p>

<p>See <a href="https://metacpan.org/pod/IPC::Open2">IPC::Open2</a>, <a href="https://metacpan.org/pod/IPC::Open3">IPC::Open3</a>, and <a href="https://metacpan.org/pod/distribution/perl/pod/perlipc.pod#Bidirectional-Communication-with-Another-Process">&quot;Bidirectional Communication with Another Process&quot; in perlipc</a> for examples of such things.</p>

<p>On systems that support a close-on-exec flag on files, that flag is set on all newly opened file descriptors whose <a href="CORE.html#fileno-FILEHANDLE"><code>fileno</code></a>s are <i>higher</i> than the current value of <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$%5EF"><code>$^F</code></a> (by default 2 for <code>STDERR</code>). See <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$%5EF">&quot;$^F&quot; in perlvar</a>.</p>

</dd>
<dt id="pop-ARRAY"><a id="pop"></a>pop ARRAY  </dt>
<dd>

</dd>
<dt id="pop1">pop</dt>
<dd>

<p>Removes and returns the <b>last</b> element of the array, shortening the array by one element.</p>

<pre><code>    my @arr  = (&#39;cat&#39;, &#39;dog&#39;, &#39;mouse&#39;);
    my $item = pop(@arr); # &#39;mouse&#39;

    # @arr is now (&#39;cat&#39;, &#39;dog&#39;)</code></pre>

<p>Returns <code>undef</code> if the array is empty.</p>

<p><b>Note:</b> <code>pop</code> may also return <code>undef</code> if the last element in the array is <code>undef</code>.</p>

<pre><code>    my @arr  = (&#39;one&#39;, &#39;two&#39;, undef);
    my $item = pop(@arr); # undef</code></pre>

<p>If ARRAY is omitted, <code>pop</code> operates on the <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#@ARGV"><code>@ARGV</code></a> array in the main program, but the <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#@_"><code>@_</code></a> array in subroutines. <code>pop</code> will operate on the <code>@ARGV</code> array in <code>eval STRING</code>, <code>BEGIN {}</code>, <code>INIT {}</code>, <code>CHECK {}</code> blocks.</p>

<p>Starting with Perl 5.14, an experimental feature allowed <a href="CORE.html#pop-ARRAY"><code>pop</code></a> to take a scalar expression. This experiment has been deemed unsuccessful, and was removed as of Perl 5.24.</p>

</dd>
<dt id="pos-SCALAR"><a id="pos"></a>pos SCALAR  </dt>
<dd>

</dd>
<dt id="pos1">pos</dt>
<dd>

<p>Returns the offset of where the last <code>m//g</code> search left off for the variable in question (<a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a> is used when the variable is not specified). This offset is in characters unless the (no-longer-recommended) <a href="https://metacpan.org/pod/bytes"><code>use bytes</code></a> pragma is in effect, in which case the offset is in bytes. Note that 0 is a valid match offset. <a href="CORE.html#undef-EXPR"><code>undef</code></a> indicates that the search position is reset (usually due to match failure, but can also be because no match has yet been run on the scalar).</p>

<p><a href="CORE.html#pos-SCALAR"><code>pos</code></a> directly accesses the location used by the regexp engine to store the offset, so assigning to <a href="CORE.html#pos-SCALAR"><code>pos</code></a> will change that offset, and so will also influence the <code>\G</code> zero-width assertion in regular expressions. Both of these effects take place for the next match, so you can&#39;t affect the position with <a href="CORE.html#pos-SCALAR"><code>pos</code></a> during the current match, such as in <code>(?{pos() = 5})</code> or <code>s//pos() = 5/e</code>.</p>

<p>Setting <a href="CORE.html#pos-SCALAR"><code>pos</code></a> also resets the <i>matched with zero-length</i> flag, described under <a href="https://metacpan.org/pod/distribution/perl/pod/perlre.pod#Repeated-Patterns-Matching-a-Zero-length-Substring">&quot;Repeated Patterns Matching a Zero-length Substring&quot; in perlre</a>.</p>

<p>Because a failed <code>m//gc</code> match doesn&#39;t reset the offset, the return from <a href="CORE.html#pos-SCALAR"><code>pos</code></a> won&#39;t change either in this case. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlre.pod">perlre</a> and <a href="https://metacpan.org/pod/distribution/perl/pod/perlop.pod">perlop</a>.</p>

</dd>
<dt id="print-FILEHANDLE-LIST"><a id="print"></a>print FILEHANDLE LIST </dt>
<dd>

</dd>
<dt id="print-FILEHANDLE"><a id="print1"></a>print FILEHANDLE</dt>
<dd>

</dd>
<dt id="print-LIST"><a id="print2"></a>print LIST</dt>
<dd>

</dd>
<dt id="print3">print</dt>
<dd>

<p>Prints a string or a list of strings. Returns true if successful. FILEHANDLE may be a scalar variable containing the name of or a reference to the filehandle, thus introducing one level of indirection. (NOTE: If FILEHANDLE is a variable and the next token is a term, it may be misinterpreted as an operator unless you interpose a <code>+</code> or put parentheses around the arguments.) If FILEHANDLE is omitted, prints to the last selected (see <a href="CORE.html#select-FILEHANDLE"><code>select</code></a>) output handle. If LIST is omitted, prints <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a> to the currently selected output handle. To use FILEHANDLE alone to print the content of <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a> to it, you must use a bareword filehandle like <code>FH</code>, not an indirect one like <code>$fh</code>. To set the default output handle to something other than STDOUT, use the select operation.</p>

<p>The current value of <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$,"><code>$,</code></a> (if any) is printed between each LIST item. The current value of <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$%5C"><code>$\</code></a> (if any) is printed after the entire LIST has been printed. Because print takes a LIST, anything in the LIST is evaluated in list context, including any subroutines whose return lists you pass to <a href="CORE.html#print-FILEHANDLE-LIST"><code>print</code></a>. Be careful not to follow the print keyword with a left parenthesis unless you want the corresponding right parenthesis to terminate the arguments to the print; put parentheses around all arguments (or interpose a <code>+</code>, but that doesn&#39;t look as good).</p>

<p>If you&#39;re storing handles in an array or hash, or in general whenever you&#39;re using any expression more complex than a bareword handle or a plain, unsubscripted scalar variable to retrieve it, you will have to use a block returning the filehandle value instead, in which case the LIST may not be omitted:</p>

<pre><code>    print { $files[$i] } &quot;stuff\n&quot;;
    print { $OK ? *STDOUT : *STDERR } &quot;stuff\n&quot;;</code></pre>

<p>Printing to a closed pipe or socket will generate a SIGPIPE signal. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlipc.pod">perlipc</a> for more on signal handling.</p>

</dd>
<dt id="printf-FILEHANDLE-FORMAT,-LIST"><a id="printf"></a><a id="printf-FILEHANDLE-FORMAT--LIST"></a>printf FILEHANDLE FORMAT, LIST </dt>
<dd>

</dd>
<dt id="printf-FILEHANDLE"><a id="printf1"></a>printf FILEHANDLE</dt>
<dd>

</dd>
<dt id="printf-FORMAT,-LIST"><a id="printf2"></a><a id="printf-FORMAT--LIST"></a>printf FORMAT, LIST</dt>
<dd>

</dd>
<dt id="printf3">printf</dt>
<dd>

<p>Equivalent to <code>print FILEHANDLE sprintf(FORMAT, LIST)</code>, except that <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$%5C"><code>$\</code></a> (the output record separator) is not appended. The FORMAT and the LIST are actually parsed as a single list. The first argument of the list will be interpreted as the <a href="CORE.html#printf-FILEHANDLE-FORMAT,-LIST"><code>printf</code></a> format. This means that <code>printf(@_)</code> will use <code>$_[0]</code> as the format. See <a href="CORE.html#sprintf-FORMAT,-LIST">sprintf</a> for an explanation of the format argument. If <code>use locale</code> (including <code>use locale &#39;:not_characters&#39;</code>) is in effect and <a href="https://metacpan.org/pod/distribution/perl/ext/POSIX/lib/POSIX.pod#setlocale"><code>POSIX::setlocale</code></a> has been called, the character used for the decimal separator in formatted floating-point numbers is affected by the <code>LC_NUMERIC</code> locale setting. See <a href="https://metacpan.org/pod/distribution/perl/pod/perllocale.pod">perllocale</a> and <a href="https://metacpan.org/pod/distribution/perl/ext/POSIX/lib/POSIX.pod">POSIX</a>.</p>

<p>For historical reasons, if you omit the list, <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a> is used as the format; to use FILEHANDLE without a list, you must use a bareword filehandle like <code>FH</code>, not an indirect one like <code>$fh</code>. However, this will rarely do what you want; if <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a> contains formatting codes, they will be replaced with the empty string and a warning will be emitted if <a href="https://metacpan.org/pod/warnings">warnings</a> are enabled. Just use <a href="CORE.html#print-FILEHANDLE-LIST"><code>print</code></a> if you want to print the contents of <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a>.</p>

<p>Don&#39;t fall into the trap of using a <a href="CORE.html#printf-FILEHANDLE-FORMAT,-LIST"><code>printf</code></a> when a simple <a href="CORE.html#print-FILEHANDLE-LIST"><code>print</code></a> would do. The <a href="CORE.html#print-FILEHANDLE-LIST"><code>print</code></a> is more efficient and less error prone.</p>

</dd>
<dt id="prototype-FUNCTION"><a id="prototype"></a>prototype FUNCTION </dt>
<dd>

</dd>
<dt id="prototype1">prototype</dt>
<dd>

<p>Returns the prototype of a function as a string (or <a href="CORE.html#undef-EXPR"><code>undef</code></a> if the function has no prototype). FUNCTION is a reference to, or the name of, the function whose prototype you want to retrieve. If FUNCTION is omitted, <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a> is used.</p>

<p>If FUNCTION is a string starting with <code>CORE::</code>, the rest is taken as a name for a Perl builtin. If the builtin&#39;s arguments cannot be adequately expressed by a prototype (such as <a href="CORE.html#system-LIST"><code>system</code></a>), <a href="CORE.html#prototype-FUNCTION"><code>prototype</code></a> returns <a href="CORE.html#undef-EXPR"><code>undef</code></a>, because the builtin does not really behave like a Perl function. Otherwise, the string describing the equivalent prototype is returned.</p>

</dd>
<dt id="push-ARRAY,LIST"><a id="push"></a><a id="push-ARRAY-LIST"></a>push ARRAY,LIST  </dt>
<dd>

<p>Adds one or more items to the <b>end</b> of an array.</p>

<pre><code>        my @animals = (&quot;cat&quot;);
        push(@animals, &quot;mouse&quot;); # (&quot;cat&quot;, &quot;mouse&quot;)

        my @colors = (&quot;red&quot;);
        push(@colors, (&quot;blue&quot;, &quot;green&quot;)); # (&quot;red&quot;, &quot;blue&quot;, &quot;green&quot;)</code></pre>

<p>Returns the number of elements in the array following the completed <a href="CORE.html#push-ARRAY,LIST"><code>push</code></a>.</p>

<pre><code>        my $color_count = push(@colors, (&quot;yellow&quot;, &quot;purple&quot;));

        say &quot;There are $color_count colors in the updated array&quot;;</code></pre>

<p>Starting with Perl 5.14, an experimental feature allowed <a href="CORE.html#push-ARRAY,LIST"><code>push</code></a> to take a scalar expression. This experiment has been deemed unsuccessful, and was removed as of Perl 5.24.</p>

</dd>
<dt id="q/STRING/"><a id="q"></a><a id="q-STRING"></a>q/STRING/</dt>
<dd>

</dd>
<dt id="qq/STRING/"><a id="qq"></a><a id="qq-STRING"></a>qq/STRING/</dt>
<dd>

</dd>
<dt id="qw/STRING/"><a id="qw"></a><a id="qw-STRING"></a>qw/STRING/</dt>
<dd>

</dd>
<dt id="qx/STRING/"><a id="qx"></a><a id="qx-STRING"></a>qx/STRING/</dt>
<dd>

<p>Generalized quotes. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlop.pod#Quote-Like-Operators">&quot;Quote-Like Operators&quot; in perlop</a>.</p>

</dd>
<dt id="qr/STRING/"><a id="qr"></a><a id="qr-STRING"></a>qr/STRING/</dt>
<dd>

<p>Regexp-like quote. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlop.pod#Regexp-Quote-Like-Operators">&quot;Regexp Quote-Like Operators&quot; in perlop</a>.</p>

</dd>
<dt id="quotemeta-EXPR"><a id="quotemeta"></a>quotemeta EXPR  </dt>
<dd>

</dd>
<dt id="quotemeta1">quotemeta</dt>
<dd>

<p>Returns the value of EXPR with all the ASCII non-&quot;word&quot; characters backslashed. (That is, all ASCII characters not matching <code>/[A-Za-z_0-9]/</code> will be preceded by a backslash in the returned string, regardless of any locale settings.) This is the internal function implementing the <code>\Q</code> escape in double-quoted strings. (See below for the behavior on non-ASCII code points.)</p>

<p>If EXPR is omitted, uses <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a>.</p>

<p>quotemeta (and <code>\Q</code> ... <code>\E</code>) are useful when interpolating strings into regular expressions, because by default an interpolated variable will be considered a mini-regular expression. For example:</p>

<pre><code>    my $sentence = &#39;The quick brown fox jumped over the lazy dog&#39;;
    my $substring = &#39;quick.*?fox&#39;;
    $sentence =~ s{$substring}{big bad wolf};</code></pre>

<p>Will cause <code>$sentence</code> to become <code>&#39;The big bad wolf jumped over...&#39;</code>.</p>

<p>On the other hand:</p>

<pre><code>    my $sentence = &#39;The quick brown fox jumped over the lazy dog&#39;;
    my $substring = &#39;quick.*?fox&#39;;
    $sentence =~ s{\Q$substring\E}{big bad wolf};</code></pre>

<p>Or:</p>

<pre><code>    my $sentence = &#39;The quick brown fox jumped over the lazy dog&#39;;
    my $substring = &#39;quick.*?fox&#39;;
    my $quoted_substring = quotemeta($substring);
    $sentence =~ s{$quoted_substring}{big bad wolf};</code></pre>

<p>Will both leave the sentence as is. Normally, when accepting literal string input from the user, <a href="CORE.html#quotemeta-EXPR"><code>quotemeta</code></a> or <code>\Q</code> must be used.</p>

<p>Beware that if you put literal backslashes (those not inside interpolated variables) between <code>\Q</code> and <code>\E</code>, double-quotish backslash interpolation may lead to confusing results. If you <i>need</i> to use literal backslashes within <code>\Q...\E</code>, consult <a href="https://metacpan.org/pod/distribution/perl/pod/perlop.pod#Gory-details-of-parsing-quoted-constructs">&quot;Gory details of parsing quoted constructs&quot; in perlop</a>.</p>

<p>Because the result of <span style="white-space: nowrap;"><code>&quot;\Q <i>STRING</i> \E&quot;</code></span> has all metacharacters quoted, there is no way to insert a literal <code>$</code> or <code>@</code> inside a <code>\Q\E</code> pair. If protected by <code>\</code>, <code>$</code> will be quoted to become <code>&quot;\\\$&quot;</code>; if not, it is interpreted as the start of an interpolated scalar.</p>

<p>In Perl v5.14, all non-ASCII characters are quoted in non-UTF-8-encoded strings, but not quoted in UTF-8 strings.</p>

<p>Starting in Perl v5.16, Perl adopted a Unicode-defined strategy for quoting non-ASCII characters; the quoting of ASCII characters is unchanged.</p>

<p>Also unchanged is the quoting of non-UTF-8 strings when outside the scope of a <a href="https://metacpan.org/pod/feature#The-&#39;unicode_strings&#39;-feature"><code>use feature &#39;unicode_strings&#39;</code></a>, which is to quote all characters in the upper Latin1 range. This provides complete backwards compatibility for old programs which do not use Unicode. (Note that <code>unicode_strings</code> is automatically enabled within the scope of a <span style="white-space: nowrap;"><code>use v5.12</code></span> or greater.)</p>

<p>Within the scope of <a href="https://metacpan.org/pod/locale"><code>use locale</code></a>, all non-ASCII Latin1 code points are quoted whether the string is encoded as UTF-8 or not. As mentioned above, locale does not affect the quoting of ASCII-range characters. This protects against those locales where characters such as <code>&quot;|&quot;</code> are considered to be word characters.</p>

<p>Otherwise, Perl quotes non-ASCII characters using an adaptation from Unicode (see <a href="https://www.unicode.org/reports/tr31/">https://www.unicode.org/reports/tr31/</a>). The only code points that are quoted are those that have any of the Unicode properties: Pattern_Syntax, Pattern_White_Space, White_Space, Default_Ignorable_Code_Point, or General_Category=Control.</p>

<p>Of these properties, the two important ones are Pattern_Syntax and Pattern_White_Space. They have been set up by Unicode for exactly this purpose of deciding which characters in a regular expression pattern should be quoted. No character that can be in an identifier has these properties.</p>

<p>Perl promises, that if we ever add regular expression pattern metacharacters to the dozen already defined (<code>\ | ( ) [ { ^ $ * + ? .</code>), that we will only use ones that have the Pattern_Syntax property. Perl also promises, that if we ever add characters that are considered to be white space in regular expressions (currently mostly affected by <code>/x</code>), they will all have the Pattern_White_Space property.</p>

<p>Unicode promises that the set of code points that have these two properties will never change, so something that is not quoted in v5.16 will never need to be quoted in any future Perl release. (Not all the code points that match Pattern_Syntax have actually had characters assigned to them; so there is room to grow, but they are quoted whether assigned or not. Perl, of course, would never use an unassigned code point as an actual metacharacter.)</p>

<p>Quoting characters that have the other 3 properties is done to enhance the readability of the regular expression and not because they actually need to be quoted for regular expression purposes (characters with the White_Space property are likely to be indistinguishable on the page or screen from those with the Pattern_White_Space property; and the other two properties contain non-printing characters).</p>

</dd>
<dt id="rand-EXPR"><a id="rand"></a>rand EXPR  </dt>
<dd>

</dd>
<dt id="rand1">rand</dt>
<dd>

<p>Returns a random fractional number greater than or equal to <code>0</code> and less than the value of EXPR. (EXPR should be positive.) If EXPR is omitted, the value <code>1</code> is used. Currently EXPR with the value <code>0</code> is also special-cased as <code>1</code> (this was undocumented before Perl 5.8.0 and is subject to change in future versions of Perl). Automatically calls <a href="CORE.html#srand-EXPR"><code>srand</code></a> unless <a href="CORE.html#srand-EXPR"><code>srand</code></a> has already been called. See also <a href="CORE.html#srand-EXPR"><code>srand</code></a>.</p>

<p>Apply <a href="CORE.html#int-EXPR"><code>int</code></a> to the value returned by <a href="CORE.html#rand-EXPR"><code>rand</code></a> if you want random integers instead of random fractional numbers. For example,</p>

<pre><code>    int(rand(10))</code></pre>

<p>returns a random integer between <code>0</code> and <code>9</code>, inclusive.</p>

<p>(Note: If your rand function consistently returns numbers that are too large or too small, then your version of Perl was probably compiled with the wrong number of RANDBITS.)</p>

<p><b><a href="CORE.html#rand-EXPR"><code>rand</code></a> is not cryptographically secure. You should not rely on it in security-sensitive situations.</b> As of this writing, a number of third-party CPAN modules offer random number generators intended by their authors to be cryptographically secure, including: <a href="../Data::Entropy.html">Data::Entropy</a>, <a href="../Crypt::Random.html">Crypt::Random</a>, <a href="../Math::Random::Secure.html">Math::Random::Secure</a>, and <a href="../Math::TrulyRandom.html">Math::TrulyRandom</a>.</p>

</dd>
<dt id="read-FILEHANDLE,SCALAR,LENGTH,OFFSET"><a id="read"></a><a id="read-FILEHANDLE-SCALAR-LENGTH-OFFSET"></a>read FILEHANDLE,SCALAR,LENGTH,OFFSET  </dt>
<dd>

</dd>
<dt id="read-FILEHANDLE,SCALAR,LENGTH"><a id="read1"></a><a id="read-FILEHANDLE-SCALAR-LENGTH"></a>read FILEHANDLE,SCALAR,LENGTH</dt>
<dd>

<p>Attempts to read LENGTH <i>characters</i> of data into variable SCALAR from the specified FILEHANDLE. Returns the number of characters actually read, <code>0</code> at end of file, or undef if there was an error (in the latter case <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$!"><code>$!</code></a> is also set). SCALAR will be grown or shrunk so that the last character actually read is the last character of the scalar after the read.</p>

<p>An OFFSET may be specified to place the read data at some place in the string other than the beginning. A negative OFFSET specifies placement at that many characters counting backwards from the end of the string. A positive OFFSET greater than the length of SCALAR results in the string being padded to the required size with <code>&quot;\0&quot;</code> bytes before the result of the read is appended.</p>

<p>The call is implemented in terms of either Perl&#39;s or your system&#39;s native <a href="http://man.he.net/man3/fread">fread(3)</a> library function, via the <a href="https://metacpan.org/pod/PerlIO">PerlIO</a> layers applied to the handle. To get a true <a href="http://man.he.net/man2/read">read(2)</a> system call, see <a href="CORE.html#sysread-FILEHANDLE,SCALAR,LENGTH,OFFSET">sysread</a>.</p>

<p>Note the <i>characters</i>: depending on the status of the filehandle, either (8-bit) bytes or characters are read. By default, all filehandles operate on bytes, but for example if the filehandle has been opened with the <code>:utf8</code> I/O layer (see <a href="CORE.html#open-FILEHANDLE,MODE,EXPR"><code>open</code></a>, and the <a href="https://metacpan.org/pod/open">open</a> pragma), the I/O will operate on UTF8-encoded Unicode characters, not bytes. Similarly for the <code>:encoding</code> layer: in that case pretty much any characters can be read.</p>

</dd>
<dt id="readdir-DIRHANDLE"><a id="readdir"></a>readdir DIRHANDLE </dt>
<dd>

<p>Returns the next directory entry for a directory opened by <a href="CORE.html#opendir-DIRHANDLE,EXPR"><code>opendir</code></a>. If used in list context, returns all the rest of the entries in the directory. If there are no more entries, returns the undefined value in scalar context and the empty list in list context.</p>

<p>If you&#39;re planning to filetest the return values out of a <a href="CORE.html#readdir-DIRHANDLE"><code>readdir</code></a>, you&#39;d better prepend the directory in question. Otherwise, because we didn&#39;t <a href="CORE.html#chdir-EXPR"><code>chdir</code></a> there, it would have been testing the wrong file.</p>

<pre><code>    opendir(my $dh, $some_dir) || die &quot;Can&#39;t opendir $some_dir: $!&quot;;
    my @dots = grep { /^\./ &amp;&amp; -f &quot;$some_dir/$_&quot; } readdir($dh);
    closedir $dh;</code></pre>

<p>As of Perl 5.12 you can use a bare <a href="CORE.html#readdir-DIRHANDLE"><code>readdir</code></a> in a <code>while</code> loop, which will set <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a> on every iteration. If either a <code>readdir</code> expression or an explicit assignment of a <code>readdir</code> expression to a scalar is used as a <code>while</code>/<code>for</code> condition, then the condition actually tests for definedness of the expression&#39;s value, not for its regular truth value.</p>

<pre><code>    opendir(my $dh, $some_dir) || die &quot;Can&#39;t open $some_dir: $!&quot;;
    while (readdir $dh) {
        print &quot;$some_dir/$_\n&quot;;
    }
    closedir $dh;</code></pre>

<p>To avoid confusing would-be users of your code who are running earlier versions of Perl with mysterious failures, put this sort of thing at the top of your file to signal that your code will work <i>only</i> on Perls of a recent vintage:</p>

<pre><code>    use v5.12; # so readdir assigns to $_ in a lone while test</code></pre>

</dd>
<dt id="readline-EXPR"><a id="readline"></a>readline EXPR</dt>
<dd>

</dd>
<dt id="readline1">readline   </dt>
<dd>

<p>Reads from the filehandle whose typeglob is contained in EXPR (or from <code>*ARGV</code> if EXPR is not provided). In scalar context, each call reads and returns the next line until end-of-file is reached, whereupon the subsequent call returns <a href="CORE.html#undef-EXPR"><code>undef</code></a>. In list context, reads until end-of-file is reached and returns a list of lines. Note that the notion of &quot;line&quot; used here is whatever you may have defined with <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$/"><code>$/</code></a> (or <code>$INPUT_RECORD_SEPARATOR</code> in <a href="https://metacpan.org/pod/English">English</a>). See <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$/">&quot;$/&quot; in perlvar</a>.</p>

<p>When <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$/"><code>$/</code></a> is set to <a href="CORE.html#undef-EXPR"><code>undef</code></a>, when <a href="CORE.html#readline-EXPR"><code>readline</code></a> is in scalar context (i.e., file slurp mode), and when an empty file is read, it returns <code>&#39;&#39;</code> the first time, followed by <a href="CORE.html#undef-EXPR"><code>undef</code></a> subsequently.</p>

<p>This is the internal function implementing the <code>&lt;EXPR&gt;</code> operator, but you can use it directly. The <code>&lt;EXPR&gt;</code> operator is discussed in more detail in <a href="https://metacpan.org/pod/distribution/perl/pod/perlop.pod#I/O-Operators">&quot;I/O Operators&quot; in perlop</a>.</p>

<pre><code>    my $line = &lt;STDIN&gt;;
    my $line = readline(STDIN);    # same thing</code></pre>

<p>If <a href="CORE.html#readline-EXPR"><code>readline</code></a> encounters an operating system error, <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$!"><code>$!</code></a> will be set with the corresponding error message. It can be helpful to check <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$!"><code>$!</code></a> when you are reading from filehandles you don&#39;t trust, such as a tty or a socket. The following example uses the operator form of <a href="CORE.html#readline-EXPR"><code>readline</code></a> and dies if the result is not defined.</p>

<pre><code>    while ( ! eof($fh) ) {
        defined( $_ = readline $fh ) or die &quot;readline failed: $!&quot;;
        ...
    }</code></pre>

<p>Note that you can&#39;t handle <a href="CORE.html#readline-EXPR"><code>readline</code></a> errors that way with the <code>ARGV</code> filehandle. In that case, you have to open each element of <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#@ARGV"><code>@ARGV</code></a> yourself since <a href="CORE.html#eof-FILEHANDLE"><code>eof</code></a> handles <code>ARGV</code> differently.</p>

<pre><code>    foreach my $arg (@ARGV) {
        open(my $fh, $arg) or warn &quot;Can&#39;t open $arg: $!&quot;;

        while ( ! eof($fh) ) {
            defined( $_ = readline $fh )
                or die &quot;readline failed for $arg: $!&quot;;
            ...
        }
    }</code></pre>

<p>Like the <code>&lt;EXPR&gt;</code> operator, if a <code>readline</code> expression is used as the condition of a <code>while</code> or <code>for</code> loop, then it will be implicitly assigned to <code>$_</code>. If either a <code>readline</code> expression or an explicit assignment of a <code>readline</code> expression to a scalar is used as a <code>while</code>/<code>for</code> condition, then the condition actually tests for definedness of the expression&#39;s value, not for its regular truth value.</p>

</dd>
<dt id="readlink-EXPR"><a id="readlink"></a>readlink EXPR </dt>
<dd>

</dd>
<dt id="readlink1">readlink</dt>
<dd>

<p>Returns the value of a symbolic link, if symbolic links are implemented. If not, raises an exception. If there is a system error, returns the undefined value and sets <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$!"><code>$!</code></a> (errno). If EXPR is omitted, uses <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a>.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#readlink">&quot;readlink&quot; in perlport</a>.</p>

</dd>
<dt id="readpipe-EXPR"><a id="readpipe"></a>readpipe EXPR</dt>
<dd>

</dd>
<dt id="readpipe1">readpipe </dt>
<dd>

<p>EXPR is executed as a system command. The collected standard output of the command is returned. In scalar context, it comes back as a single (potentially multi-line) string. In list context, returns a list of lines (however you&#39;ve defined lines with <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$/"><code>$/</code></a> (or <code>$INPUT_RECORD_SEPARATOR</code> in <a href="https://metacpan.org/pod/English">English</a>)). This is the internal function implementing the <code>qx/EXPR/</code> operator, but you can use it directly. The <code>qx/EXPR/</code> operator is discussed in more detail in <a href="https://metacpan.org/pod/distribution/perl/pod/perlop.pod#qx/STRING/">&quot;<code>qx/<i>STRING</i>/</code>&quot; in perlop</a>. If EXPR is omitted, uses <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a>.</p>

</dd>
<dt id="recv-SOCKET,SCALAR,LENGTH,FLAGS"><a id="recv"></a><a id="recv-SOCKET-SCALAR-LENGTH-FLAGS"></a>recv SOCKET,SCALAR,LENGTH,FLAGS </dt>
<dd>

<p>Receives a message on a socket. Attempts to receive LENGTH characters of data into variable SCALAR from the specified SOCKET filehandle. SCALAR will be grown or shrunk to the length actually read. Takes the same flags as the system call of the same name. Returns the address of the sender if SOCKET&#39;s protocol supports this; returns an empty string otherwise. If there&#39;s an error, returns the undefined value. This call is actually implemented in terms of the <a href="http://man.he.net/man2/recvfrom">recvfrom(2)</a> system call. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlipc.pod#UDP:-Message-Passing">&quot;UDP: Message Passing&quot; in perlipc</a> for examples.</p>

<p>Note that if the socket has been marked as <code>:utf8</code>, <code>recv</code> will throw an exception. The <code>:encoding(...)</code> layer implicitly introduces the <code>:utf8</code> layer. See <a href="CORE.html#binmode-FILEHANDLE,-LAYER"><code>binmode</code></a>.</p>

</dd>
<dt id="redo-LABEL"><a id="redo"></a>redo LABEL </dt>
<dd>

</dd>
<dt id="redo-EXPR"><a id="redo1"></a>redo EXPR</dt>
<dd>

</dd>
<dt id="redo2">redo</dt>
<dd>

<p>The <a href="CORE.html#redo-LABEL"><code>redo</code></a> command restarts the loop block without evaluating the conditional again. The <a href="CORE.html#continue-BLOCK"><code>continue</code></a> block, if any, is not executed. If the LABEL is omitted, the command refers to the innermost enclosing loop. The <code>redo EXPR</code> form, available starting in Perl 5.18.0, allows a label name to be computed at run time, and is otherwise identical to <code>redo LABEL</code>. Programs that want to lie to themselves about what was just input normally use this command:</p>

<pre><code>    # a simpleminded Pascal comment stripper
    # (warning: assumes no { or } in strings)
    LINE: while (&lt;STDIN&gt;) {
        while (s|({.*}.*){.*}|$1 |) {}
        s|{.*}| |;
        if (s|{.*| |) {
            my $front = $_;
            while (&lt;STDIN&gt;) {
                if (/}/) {  # end of comment?
                    s|^|$front\{|;
                    redo LINE;
                }
            }
        }
        print;
    }</code></pre>

<p><a href="CORE.html#redo-LABEL"><code>redo</code></a> cannot return a value from a block that typically returns a value, such as <code>eval {}</code>, <code>sub {}</code>, or <code>do {}</code>. It will perform its flow control behavior, which precludes any return value. It should not be used to exit a <a href="CORE.html#grep-BLOCK-LIST"><code>grep</code></a> or <a href="CORE.html#map-BLOCK-LIST"><code>map</code></a> operation.</p>

<p>Note that a block by itself is semantically identical to a loop that executes once. Thus <a href="CORE.html#redo-LABEL"><code>redo</code></a> inside such a block will effectively turn it into a looping construct.</p>

<p>See also <a href="CORE.html#continue-BLOCK"><code>continue</code></a> for an illustration of how <a href="CORE.html#last-LABEL"><code>last</code></a>, <a href="CORE.html#next-LABEL"><code>next</code></a>, and <a href="CORE.html#redo-LABEL"><code>redo</code></a> work.</p>

<p>Unlike most named operators, this has the same precedence as assignment. It is also exempt from the looks-like-a-function rule, so <code>redo (&quot;foo&quot;).&quot;bar&quot;</code> will cause &quot;bar&quot; to be part of the argument to <a href="CORE.html#redo-LABEL"><code>redo</code></a>.</p>

</dd>
<dt id="ref-EXPR"><a id="ref"></a>ref EXPR  </dt>
<dd>

</dd>
<dt id="ref1">ref</dt>
<dd>

<p>Examines the value of EXPR, expecting it to be a reference, and returns a string giving information about the reference and the type of referent. If EXPR is not specified, <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a> will be used.</p>

<p>If the operand is not a reference, then the empty string will be returned. An empty string will only be returned in this situation. <code>ref</code> is often useful to just test whether a value is a reference, which can be done by comparing the result to the empty string. It is a common mistake to use the result of <code>ref</code> directly as a truth value: this goes wrong because <code>0</code> (which is false) can be returned for a reference.</p>

<p>If the operand is a reference to a blessed object, then the name of the class into which the referent is blessed will be returned. <code>ref</code> doesn&#39;t care what the physical type of the referent is; blessing takes precedence over such concerns. Beware that exact comparison of <code>ref</code> results against a class name doesn&#39;t perform a class membership test: a class&#39;s members also include objects blessed into subclasses, for which <code>ref</code> will return the name of the subclass. Also beware that class names can clash with the built-in type names (described below).</p>

<p>If the operand is a reference to an unblessed object, then the return value indicates the type of object. If the unblessed referent is not a scalar, then the return value will be one of the strings <code>ARRAY</code>, <code>HASH</code>, <code>CODE</code>, <code>FORMAT</code>, or <code>IO</code>, indicating only which kind of object it is. If the unblessed referent is a scalar, then the return value will be one of the strings <code>SCALAR</code>, <code>VSTRING</code>, <code>REF</code>, <code>GLOB</code>, <code>LVALUE</code>, or <code>REGEXP</code>, depending on the kind of value the scalar currently has. But note that <code>qr//</code> scalars are created already blessed, so <code>ref qr/.../</code> will likely return <code>Regexp</code>. Beware that these built-in type names can also be used as class names, so <code>ref</code> returning one of these names doesn&#39;t unambiguously indicate that the referent is of the kind to which the name refers.</p>

<p>The ambiguity between built-in type names and class names significantly limits the utility of <code>ref</code>. For unambiguous information, use <a href="https://metacpan.org/pod/Scalar::Util#blessed"><code>Scalar::Util::blessed()</code></a> for information about blessing, and <a href="https://metacpan.org/pod/Scalar::Util#reftype"><code>Scalar::Util::reftype()</code></a> for information about physical types. Use <a href="https://metacpan.org/pod/UNIVERSAL#$obj-%3Eisa(-TYPE-)">the <code>isa</code> method</a> for class membership tests, though one must be sure of blessedness before attempting a method call. Alternatively, the <a href="https://metacpan.org/pod/distribution/perl/pod/perlop.pod#Class-Instance-Operator"><code>isa</code> operator</a> can test class membership without checking blessedness first.</p>

<p>See also <a href="https://metacpan.org/pod/distribution/perl/pod/perlref.pod">perlref</a> and <a href="https://metacpan.org/pod/distribution/perl/pod/perlobj.pod">perlobj</a>.</p>

</dd>
<dt id="rename-OLDNAME,NEWNAME"><a id="rename"></a><a id="rename-OLDNAME-NEWNAME"></a>rename OLDNAME,NEWNAME    </dt>
<dd>

<p>Changes the name of a file; an existing file NEWNAME will be clobbered. Returns true for success; on failure returns false and sets <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$!"><code>$!</code></a>.</p>

<p>Behavior of this function varies wildly depending on your system implementation. For example, it will usually not work across file system boundaries, even though the system <i>mv</i> command sometimes compensates for this. Other restrictions include whether it works on directories, open files, or pre-existing files. Check <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod">perlport</a> and either the <a href="http://man.he.net/man2/rename">rename(2)</a> manpage or equivalent system documentation for details.</p>

<p>For a platform independent <a href="https://metacpan.org/pod/File::Copy#move"><code>move</code></a> function look at the <a href="https://metacpan.org/pod/File::Copy">File::Copy</a> module.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#rename">&quot;rename&quot; in perlport</a>.</p>

</dd>
<dt id="require-VERSION"><a id="require"></a>require VERSION </dt>
<dd>

</dd>
<dt id="require-EXPR"><a id="require1"></a>require EXPR</dt>
<dd>

</dd>
<dt id="require2">require</dt>
<dd>

<p>Demands a version of Perl specified by VERSION, or demands some semantics specified by EXPR or by <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a> if EXPR is not supplied.</p>

<p>VERSION may be either a literal such as v5.24.1, which will be compared to <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$%5EV"><code>$^V</code></a> (or <code>$PERL_VERSION</code> in <a href="https://metacpan.org/pod/English">English</a>), or a numeric argument of the form 5.024001, which will be compared to <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$%5D"><code>$]</code></a>. An exception is raised if VERSION is greater than the version of the current Perl interpreter. Compare with <a href="CORE.html#use-Module-VERSION-LIST"><code>use</code></a>, which can do a similar check at compile time.</p>

<p>Specifying VERSION as a numeric argument of the form 5.024001 should generally be avoided as older less readable syntax compared to v5.24.1. Before perl 5.8.0 (released in 2002), the more verbose numeric form was the only supported syntax, which is why you might see it in older code.</p>

<pre><code>    require v5.24.1;    # run time version check
    require 5.24.1;     # ditto
    require 5.024_001;  # ditto; older syntax compatible
                          with perl 5.6</code></pre>

<p>Otherwise, <a href="CORE.html#require-VERSION"><code>require</code></a> demands that a library file be included if it hasn&#39;t already been included. The file is included via the do-FILE mechanism, which is essentially just a variety of <a href="CORE.html#eval-EXPR"><code>eval</code></a> with the caveat that lexical variables in the invoking script will be invisible to the included code. If it were implemented in pure Perl, it would have semantics similar to the following:</p>

<pre><code>    use Carp &#39;croak&#39;;
    use version;

    sub require {
        my ($filename) = @_;
        if ( my $version = eval { version-&gt;parse($filename) } ) {
            if ( $version &gt; $^V ) {
               my $vn = $version-&gt;normal;
               croak &quot;Perl $vn required--this is only $^V, stopped&quot;;
            }
            return 1;
        }

        if (exists $INC{$filename}) {
            return 1 if $INC{$filename};
            croak &quot;Compilation failed in require&quot;;
        }

        local $INC;
        # this type of loop lets a hook overwrite $INC if they wish
        for($INC = 0; $INC &lt; @INC; $INC++) {
            my $prefix = $INC[$INC];
            if (!defined $prefix) {
                next;
            }
            if (ref $prefix) {
                #... do other stuff - see text below ....
            }
            # (see text below about possible appending of .pmc
            # suffix to $filename)
            my $realfilename = &quot;$prefix/$filename&quot;;
            next if ! -e $realfilename || -d _ || -b _;
            $INC{$filename} = $realfilename;
            my $result = do($realfilename);
                         # but run in caller&#39;s namespace

            if (!defined $result) {
                $INC{$filename} = undef;
                croak $@ ? &quot;$@Compilation failed in require&quot;
                         : &quot;Can&#39;t locate $filename: $!\n&quot;;
            }
            if (!$result) {
                delete $INC{$filename};
                croak &quot;$filename did not return true value&quot;;
            }
            $! = 0;
            return $result;
        }
        croak &quot;Can&#39;t locate $filename in \@INC ...&quot;;
    }</code></pre>

<p>Note that the file will not be included twice under the same specified name.</p>

<p>Historically the file must return true as the last statement to indicate successful execution of any initialization code, so it&#39;s customary to end such a file with <code>1;</code> unless you&#39;re sure it&#39;ll return true otherwise. But it&#39;s better just to put the <code>1;</code>, in case you add more statements. As of 5.37.6 this requirement may be avoided by enabling the &#39;module_true&#39; feature, which is enabled by default in modern version bundles. Thus code with <code>use v5.37;</code> no longer needs to concern itself with this issue. See <a href="https://metacpan.org/pod/feature">feature</a> for more details. Note that this affects the compilation unit within which the feature is used, and using it before requiring a module will not change the behavior of existing modules that do not themselves also use it.</p>

<p>If EXPR is a bareword, <a href="CORE.html#require-VERSION"><code>require</code></a> assumes a <i>.pm</i> extension and replaces <code>::</code> with <code>/</code> in the filename for you, to make it easy to load standard modules. This form of loading of modules does not risk altering your namespace, however it will autovivify the stash for the required module.</p>

<p>In other words, if you try this:</p>

<pre><code>        require Foo::Bar;     # a splendid bareword</code></pre>

<p>The require function will actually look for the <i>Foo/Bar.pm</i> file in the directories specified in the <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#@INC"><code>@INC</code></a> array, and it will autovivify the <code>Foo::Bar::</code> stash at compile time.</p>

<p>But if you try this:</p>

<pre><code>        my $class = &#39;Foo::Bar&#39;;
        require $class;       # $class is not a bareword
    #or
        require &quot;Foo::Bar&quot;;   # not a bareword because of the &quot;&quot;</code></pre>

<p>The require function will look for the <i>Foo::Bar</i> file in the <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#@INC"><code>@INC</code></a> array and will complain about not finding <i>Foo::Bar</i> there. In this case you can do:</p>

<pre><code>        eval &quot;require $class&quot;;</code></pre>

<p>or you could do</p>

<pre><code>        require &quot;Foo/Bar.pm&quot;;</code></pre>

<p>Neither of these forms will autovivify any stashes at compile time and only have run time effects.</p>

<p>Now that you understand how <a href="CORE.html#require-VERSION"><code>require</code></a> looks for files with a bareword argument, there is a little extra functionality going on behind the scenes. Before <a href="CORE.html#require-VERSION"><code>require</code></a> looks for a <i>.pm</i> extension, it will first look for a similar filename with a <i>.pmc</i> extension. If this file is found, it will be loaded in place of any file ending in a <i>.pm</i> extension. This applies to both the explicit <code>require &quot;Foo/Bar.pm&quot;;</code> form and the <code>require Foo::Bar;</code> form.</p>

<p>You can also insert hooks into the import facility by putting Perl coderefs or objects directly into the <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#@INC"><code>@INC</code></a> array. There are two types of hooks, INC filters, and INCDIR hooks, and there are three forms of representing a hook: subroutine references, array references, and blessed objects.</p>

<p>Subroutine references are the simplest case. When the inclusion system walks through <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#@INC"><code>@INC</code></a> and encounters a subroutine, unless this subroutine is blessed and supports an INCDIR hook this subroutine will be assumed to be an INC hook will be called with two parameters, the first a reference to itself, and the second the name of the file to be included (e.g., <i>Foo/Bar.pm</i>). The subroutine should return either nothing or else a list of up to four values in the following order:</p>

<ol>

<li><p>A reference to a scalar, containing any initial source code to prepend to the file or generator output.</p>

</li>
<li><p>A filehandle, from which the file will be read.</p>

</li>
<li><p>A reference to a subroutine. If there is no filehandle (previous item), then this subroutine is expected to generate one line of source code per call, writing the line into <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a> and returning 1, then finally at end of file returning 0. If there is a filehandle, then the subroutine will be called to act as a simple source filter, with the line as read in <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a>. Again, return 1 for each valid line, and 0 after all lines have been returned. For historical reasons the subroutine will receive a meaningless argument (in fact always the numeric value zero) as <code>$_[0]</code>.</p>

</li>
<li><p>Optional state for the subroutine. The state is passed in as <code>$_[1]</code>.</p>

</li>
</ol>

<p><code>AUTOLOAD</code> cannot be used to resolve the <code>INCDIR</code> method, <code>INC</code> is checked first, and <code>AUTOLOAD</code> would resolve that.</p>

<p>If an empty list, <a href="CORE.html#undef-EXPR"><code>undef</code></a>, or nothing that matches the first 3 values above is returned, then <a href="CORE.html#require-VERSION"><code>require</code></a> looks at the remaining elements of <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#@INC"><code>@INC</code></a>. Note that this filehandle must be a real filehandle (strictly a typeglob or reference to a typeglob, whether blessed or unblessed); tied filehandles will be ignored and processing will stop there.</p>

<p>If the hook is an object, it should provide an <code>INC</code> or <code>INCDIR</code> method that will be called as above, the first parameter being the object itself. If it does not provide either method, and the object is not CODE ref then an exception will be thrown, otherwise it will simply be executed like an unblessed CODE ref would. Note that you must fully qualify the method name when you declare an <code>INC</code> sub (unlike the <code>INCDIR</code> sub), as the unqualified symbol <code>INC</code> is always forced into package <code>main</code>. Here is a typical code layout for an <code>INC</code> hook:</p>

<pre><code>    # In Foo.pm
    package Foo;
    sub new { ... }
    sub Foo::INC {
        my ($self, $filename) = @_;
        ...
    }

    # In the main program
    push @INC, Foo-&gt;new(...);</code></pre>

<p>If the hook is an array reference, its first element must be a subroutine reference or an object as described above. When the first element is an object that supports an <code>INC</code> or <code>INCDIR</code> method then the method will be called with the object as the first argument, the filename requested as the second, and the hook array reference as the the third. When the first element is a subroutine then it will be called with the array as the first argument, and the filename as the second, no third parameter will be passed in. In both forms you can modify the contents of the array to provide state between calls, or whatever you like.</p>

<p>In other words, you can write:</p>

<pre><code>    push @INC, \&amp;my_sub;
    sub my_sub {
        my ($coderef, $filename) = @_;  # $coderef is \&amp;my_sub
        ...
    }</code></pre>

<p>or:</p>

<pre><code>    push @INC, [ \&amp;my_sub, $x, $y, ... ];
    sub my_sub {
        my ($arrayref, $filename) = @_;
        # Retrieve $x, $y, ...
        my (undef, @parameters) = @$arrayref;
        ...
    }</code></pre>

<p>or:</p>

<pre><code>    push @INC, [ HookObj-&gt;new(), $x, $y, ... ];
    sub HookObj::INC {
        my ($self, $filename, $arrayref)= @_;
        my (undef, @parameters) = @$arrayref;
        ...
    }</code></pre>

<p>These hooks are also permitted to set the <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#%25INC"><code>%INC</code></a> entry corresponding to the files they have loaded. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#%25INC">&quot;%INC&quot; in perlvar</a>. Should an <code>INC</code> hook not do this then perl will set the <code>%INC</code> entry to be the hook reference itself.</p>

<p>A hook may also be used to rewrite the <code>@INC</code> array. While this might sound strange, there are situations where it can be very useful to do this. Such hooks usually just return undef and do not mix filtering and <code>@INC</code> modifications. While in older versions of perl having a hook modify <code>@INC</code> was fraught with issues and could even result in segfaults or assert failures, as of 5.37.7 the logic has been made much more robust and the hook now has control over the loop iteration if it wishes to do so.</p>

<p>There is a now a facility to control the iterator for the <code>@INC</code> array traversal that is performed during require. The <code>$INC</code> variable will be initialized with the index of the currently executing hook. Once the hook returns the next slot in <code>@INC</code> that will be checked will be the integer successor of value in <code>$INC</code> (or -1 if it is undef). For example the following code</p>

<pre><code>    push @INC, sub {
        splice @INC, $INC, 1; # remove this hook from @INC
        unshift @INC, sub { warn &quot;A&quot; };
        undef $INC; # reset the $INC iterator so we
                    # execute the newly installed sub
                    # immediately.
    };</code></pre>

<p>would install a sub into <code>@INC</code> that when executed as a hook (by for instance a require of a file that does not exist), the hook will splice itself out of <code>@INC</code>, and add a new sub to the front that will warn whenever someone does a require operation that requires an <code>@INC</code> search, and then immediately execute that hook.</p>

<p>Prior to 5.37.7, there was no way to cause perl to use the newly installed hook immediately, or to inspect any changed items in <code>@INC</code> to the left of the iterator, and so the warning would only be generated on the second call to require. In more recent perl the presence of the last statement which undefines <code>$INC</code> will cause perl to restart the traversal of the <code>@INC</code> array at the beginning and execute the newly installed sub immediately.</p>

<p>Whatever value <code>$INC</code> held, if any, will be restored at the end of the require. Any changes made to <code>$INC</code> during the lifetime of the hook will be unrolled after the hook exits, and its value only has meaning immediately after execution of the hook, thus setting <code>$INC</code> to some value prior to executing a <code>require</code> will have no effect on how the require executes at all.</p>

<p>As of 5.37.7 <code>@INC</code> values of undef will be silently ignored.</p>

<p>The function <code>require()</code> is difficult to wrap properly. Many modules consult the stack to find information about their caller, and injecting a new stack frame by wrapping <code>require()</code> often breaks things. Nevertheless it can be very helpful to have the ability to perform actions before and after a <code>require</code>, for instance for trace utilities like <code>Devel::TraceUse</code> or to measure time to load and the memory consumption of the require graph. Because of the difficulties in safely creating a <code>require()</code> wrapper in 5.37.10 we introduced a new mechanism.</p>

<p>As of 5.37.10, prior to any other actions it performs, <code>require</code> will check if <code>${^HOOK}{require__before}</code> contains a coderef, and if it does it will be called with the filename form of the item being loaded. The hook may modify <code>$_[0]</code> to load a different filename, or it may throw a fatal exception to cause the require to fail, which will be treated as though the required code itself had thrown an exception.</p>

<p>The <code>${^HOOK}{require__before}</code> hook may return a code reference, in which case the code reference will be executed (in an eval with the filname as a parameter) after the require completes. It will be executed regardless of how the compilation completed, and even if the require throws a fatal exception. The function may consult <code>%INC</code> to determine if the require failed or not. For instance the following code will print some diagnostics before and after every <code>require</code> statement. The example also includes logic to chain the signal, so that multiple signals can cooperate. Well behaved <code>${^HOOK}{require__before}</code> handlers should always take this into account.</p>

<pre><code>    {
        use Scalar::Util qw(reftype);
        my $old_hook = ${^HOOK}{require__before};
        local ${^HOOK}{require__before} = sub {
            my ($name) = @_;
            my $old_hook_ret;
            $old_hook_ret = $old_hook-&gt;($name) if $old_hook;
            warn &quot;Requiring: $name\n&quot;;
            return sub {
                $old_hook_ret-&gt;() if ref($old_hook_ret)
                                  &amp;&amp; reftype($old_hook_ret) eq &quot;CODE&quot;;
                warn sprintf &quot;Finished requiring %s: %s\n&quot;,
                        $name, $INC{$name} ? &quot;loaded&quot; :&quot;failed&quot;;
            };
        };
        require Whatever;
    }</code></pre>

<p>This hook executes for ALL <code>require</code> statements, unlike <code>INC</code> and <code>INCDIR</code> hooks, which are only executed for relative file names, and it executes first before any other special behaviour inside of require. Note that the initial hook in <code>${^HOOK}{require__before}</code> is *not* executed inside of an eval, and throwing an exception will stop further processing, but the after hook it may return is executed inside of an eval, and any exceptions it throws will be silently ignored. This is because it executes inside of the scope cleanup logic that is triggered after the require completes, and an exception at this time would not stop the module from being loaded, etc.</p>

<p>There is a similar hook that fires after require completes, <code>${^HOOK}{require__after}</code>, which will be called after each require statement completes, either via an exception or successfully. It will be called with the filename of the most recently executed require statement. It is executed in an eval, and will not in any way affect execution.</p>

<p>For a yet-more-powerful import facility built around <code>require</code>, see <a href="CORE.html#use-Module-VERSION-LIST"><code>use</code></a> and <a href="https://metacpan.org/pod/distribution/perl/pod/perlmod.pod">perlmod</a>.</p>

</dd>
<dt id="reset-EXPR"><a id="reset"></a>reset EXPR </dt>
<dd>

</dd>
<dt id="reset1">reset</dt>
<dd>

<p>Generally used in a <a href="CORE.html#continue-BLOCK"><code>continue</code></a> block at the end of a loop to clear variables and reset <code>m?pattern?</code> searches so that they work again. The expression is interpreted as a list of single characters (hyphens allowed for ranges). All variables (scalars, arrays, and hashes) in the current package beginning with one of those letters are reset to their pristine state. If the expression is omitted, one-match searches (<code>m?pattern?</code>) are reset to match again. Only resets variables or searches in the current package. Always returns 1. Examples:</p>

<pre><code>    reset &#39;X&#39;;      # reset all X variables
    reset &#39;a-z&#39;;    # reset lower case variables
    reset;          # just reset m?one-time? searches</code></pre>

<p>Resetting <code>&quot;A-Z&quot;</code> is not recommended because you&#39;ll wipe out your <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#@ARGV"><code>@ARGV</code></a> and <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#@INC"><code>@INC</code></a> arrays and your <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#%25ENV"><code>%ENV</code></a> hash.</p>

<p>Resets only package variables; lexical variables are unaffected, but they clean themselves up on scope exit anyway, so you&#39;ll probably want to use them instead. See <a href="CORE.html#my-VARLIST"><code>my</code></a>.</p>

</dd>
<dt id="return-EXPR"><a id="return"></a>return EXPR </dt>
<dd>

</dd>
<dt id="return1">return</dt>
<dd>

<p>Returns from a subroutine, <a href="CORE.html#eval-EXPR"><code>eval</code></a>, <a href="CORE.html#do-EXPR"><code>do FILE</code></a>, <a href="CORE.html#sort-SUBNAME-LIST"><code>sort</code></a> block or regex eval block (but not a <a href="CORE.html#grep-BLOCK-LIST"><code>grep</code></a>, <a href="CORE.html#map-BLOCK-LIST"><code>map</code></a>, or <a href="CORE.html#do-BLOCK"><code>do BLOCK</code></a> block) with the value given in EXPR. Evaluation of EXPR may be in list, scalar, or void context, depending on how the return value will be used, and the context may vary from one execution to the next (see <a href="CORE.html#wantarray"><code>wantarray</code></a>). If no EXPR is given, returns an empty list in list context, the undefined value in scalar context, and (of course) nothing at all in void context.</p>

<p>(In the absence of an explicit <a href="CORE.html#return-EXPR"><code>return</code></a>, a subroutine, <a href="CORE.html#eval-EXPR"><code>eval</code></a>, or <a href="CORE.html#do-EXPR"><code>do FILE</code></a> automatically returns the value of the last expression evaluated.)</p>

<p>Unlike most named operators, this is also exempt from the looks-like-a-function rule, so <code>return (&quot;foo&quot;).&quot;bar&quot;</code> will cause <code>&quot;bar&quot;</code> to be part of the argument to <a href="CORE.html#return-EXPR"><code>return</code></a>.</p>

</dd>
<dt id="reverse-LIST"><a id="reverse"></a>reverse LIST   </dt>
<dd>

<p>In list context, returns a list value consisting of the elements of LIST in the opposite order. In scalar context, concatenates the elements of LIST and returns a string value with all characters in the opposite order.</p>

<pre><code>    print join(&quot;, &quot;, reverse &quot;world&quot;, &quot;Hello&quot;); # Hello, world

    print scalar reverse &quot;dlrow ,&quot;, &quot;olleH&quot;;    # Hello, world</code></pre>

<p>Used without arguments in scalar context, <a href="CORE.html#reverse-LIST"><code>reverse</code></a> reverses <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a>.</p>

<pre><code>    $_ = &quot;dlrow ,olleH&quot;;
    print reverse;                         # No output, list context
    print scalar reverse;                  # Hello, world</code></pre>

<p>Note that reversing an array to itself (as in <code>@a = reverse @a</code>) will preserve non-existent elements whenever possible; i.e., for non-magical arrays or for tied arrays with <code>EXISTS</code> and <code>DELETE</code> methods.</p>

<p>This operator is also handy for inverting a hash, although there are some caveats. If a value is duplicated in the original hash, only one of those can be represented as a key in the inverted hash. Also, this has to unwind one hash and build a whole new one, which may take some time on a large hash, such as from a DBM file.</p>

<pre><code>    my %by_name = reverse %by_address;  # Invert the hash</code></pre>

</dd>
<dt id="rewinddir-DIRHANDLE"><a id="rewinddir"></a>rewinddir DIRHANDLE </dt>
<dd>

<p>Sets the current position to the beginning of the directory for the <a href="CORE.html#readdir-DIRHANDLE"><code>readdir</code></a> routine on DIRHANDLE.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#rewinddir">&quot;rewinddir&quot; in perlport</a>.</p>

</dd>
<dt id="rindex-STR,SUBSTR,POSITION"><a id="rindex"></a><a id="rindex-STR-SUBSTR-POSITION"></a>rindex STR,SUBSTR,POSITION </dt>
<dd>

</dd>
<dt id="rindex-STR,SUBSTR"><a id="rindex1"></a><a id="rindex-STR-SUBSTR"></a>rindex STR,SUBSTR</dt>
<dd>

<p>Works just like <a href="CORE.html#index-STR,SUBSTR,POSITION"><code>index</code></a> except that it returns the position of the <i>last</i> occurrence of SUBSTR in STR. If POSITION is specified, returns the last occurrence beginning at or before that position.</p>

</dd>
<dt id="rmdir-FILENAME"><a id="rmdir"></a>rmdir FILENAME   </dt>
<dd>

</dd>
<dt id="rmdir1">rmdir</dt>
<dd>

<p>Deletes the directory specified by FILENAME if that directory is empty. If it succeeds it returns true; otherwise it returns false and sets <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$!"><code>$!</code></a> (errno). If FILENAME is omitted, uses <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a>.</p>

<p>To remove a directory tree recursively (<code>rm -rf</code> on Unix) look at the <a href="https://metacpan.org/pod/File::Path#rmtree(-$dir-)"><code>rmtree</code></a> function of the <a href="https://metacpan.org/pod/File::Path">File::Path</a> module.</p>

</dd>
<dt id="s///"><a id="s"></a>s///</dt>
<dd>

<p>The substitution operator. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlop.pod#Regexp-Quote-Like-Operators">&quot;Regexp Quote-Like Operators&quot; in perlop</a>.</p>

</dd>
<dt id="say-FILEHANDLE-LIST"><a id="say"></a>say FILEHANDLE LIST </dt>
<dd>

</dd>
<dt id="say-FILEHANDLE"><a id="say1"></a>say FILEHANDLE</dt>
<dd>

</dd>
<dt id="say-LIST"><a id="say2"></a>say LIST</dt>
<dd>

</dd>
<dt id="say3">say</dt>
<dd>

<p>Just like <a href="CORE.html#print-FILEHANDLE-LIST"><code>print</code></a>, but implicitly appends a newline at the end of the LIST instead of any value <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$%5C"><code>$\</code></a> might have. To use FILEHANDLE without a LIST to print the contents of <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a> to it, you must use a bareword filehandle like <code>FH</code>, not an indirect one like <code>$fh</code>.</p>

<p><a href="CORE.html#say-FILEHANDLE-LIST"><code>say</code></a> is available only if the <a href="https://metacpan.org/pod/feature#The-&#39;say&#39;-feature"><code>&quot;say&quot;</code> feature</a> is enabled or if it is prefixed with <code>CORE::</code>. The <a href="https://metacpan.org/pod/feature#The-&#39;say&#39;-feature"><code>&quot;say&quot;</code> feature</a> is enabled automatically with a <code>use v5.10</code> (or higher) declaration in the current scope.</p>

</dd>
<dt id="scalar-EXPR"><a id="scalar"></a>scalar EXPR  </dt>
<dd>

<p>Forces EXPR to be interpreted in scalar context and returns the value of EXPR.</p>

<pre><code>    my @counts = ( scalar @a, scalar @b, scalar @c );</code></pre>

<p>There is no equivalent operator to force an expression to be interpolated in list context because in practice, this is never needed. If you really wanted to do so, however, you could use the construction <code>@{[ (some expression) ]}</code>, but usually a simple <code>(some expression)</code> suffices.</p>

<p>Because <a href="CORE.html#scalar-EXPR"><code>scalar</code></a> is a unary operator, if you accidentally use a parenthesized list for the EXPR, this behaves as a scalar comma expression, evaluating all but the last element in void context and returning the final element evaluated in scalar context. This is seldom what you want.</p>

<p>The following single statement:</p>

<pre><code>    print uc(scalar(foo(), $bar)), $baz;</code></pre>

<p>is the moral equivalent of these two:</p>

<pre><code>    foo();
    print(uc($bar), $baz);</code></pre>

<p>See <a href="https://metacpan.org/pod/distribution/perl/pod/perlop.pod">perlop</a> for more details on unary operators and the comma operator, and <a href="https://metacpan.org/pod/distribution/perl/pod/perldata.pod">perldata</a> for details on evaluating a hash in scalar context.</p>

</dd>
<dt id="seek-FILEHANDLE,POSITION,WHENCE"><a id="seek"></a><a id="seek-FILEHANDLE-POSITION-WHENCE"></a>seek FILEHANDLE,POSITION,WHENCE   </dt>
<dd>

<p>Sets FILEHANDLE&#39;s position, just like the <a href="http://man.he.net/man3/fseek">fseek(3)</a> call of C <code>stdio</code>. FILEHANDLE may be an expression whose value gives the name of the filehandle. The values for WHENCE are <code>0</code> to set the new position <i>in bytes</i> to POSITION; <code>1</code> to set it to the current position plus POSITION; and <code>2</code> to set it to EOF plus POSITION, typically negative. For WHENCE you may use the constants <code>SEEK_SET</code>, <code>SEEK_CUR</code>, and <code>SEEK_END</code> (start of the file, current position, end of the file) from the <a href="https://metacpan.org/pod/Fcntl">Fcntl</a> module. Returns <code>1</code> on success, false otherwise.</p>

<p>Note the emphasis on bytes: even if the filehandle has been set to operate on characters (for example using the <code>:encoding(UTF-8)</code> I/O layer), the <a href="CORE.html#seek-FILEHANDLE,POSITION,WHENCE"><code>seek</code></a>, <a href="CORE.html#tell-FILEHANDLE"><code>tell</code></a>, and <a href="CORE.html#sysseek-FILEHANDLE,POSITION,WHENCE"><code>sysseek</code></a> family of functions use byte offsets, not character offsets, because seeking to a character offset would be very slow in a UTF-8 file.</p>

<p>If you want to position the file for <a href="CORE.html#sysread-FILEHANDLE,SCALAR,LENGTH,OFFSET"><code>sysread</code></a> or <a href="CORE.html#syswrite-FILEHANDLE,SCALAR,LENGTH,OFFSET"><code>syswrite</code></a>, don&#39;t use <a href="CORE.html#seek-FILEHANDLE,POSITION,WHENCE"><code>seek</code></a>, because buffering makes its effect on the file&#39;s read-write position unpredictable and non-portable. Use <a href="CORE.html#sysseek-FILEHANDLE,POSITION,WHENCE"><code>sysseek</code></a> instead.</p>

<p>Due to the rules and rigors of ANSI C, on some systems you have to do a seek whenever you switch between reading and writing. Amongst other things, this may have the effect of calling stdio&#39;s <a href="http://man.he.net/man3/clearerr">clearerr(3)</a>. A WHENCE of <code>1</code> (<code>SEEK_CUR</code>) is useful for not moving the file position:</p>

<pre><code>    seek($fh, 0, 1);</code></pre>

<p>This is also useful for applications emulating <code>tail -f</code>. Once you hit EOF on your read and then sleep for a while, you (probably) have to stick in a dummy <a href="CORE.html#seek-FILEHANDLE,POSITION,WHENCE"><code>seek</code></a> to reset things. The <a href="CORE.html#seek-FILEHANDLE,POSITION,WHENCE"><code>seek</code></a> doesn&#39;t change the position, but it <i>does</i> clear the end-of-file condition on the handle, so that the next <code>readline FILE</code> makes Perl try again to read something. (We hope.)</p>

<p>If that doesn&#39;t work (some I/O implementations are particularly cantankerous), you might need something like this:</p>

<pre><code>    for (;;) {
        for ($curpos = tell($fh); $_ = readline($fh);
             $curpos = tell($fh)) {
            # search for some stuff and put it into files
        }
        sleep($for_a_while);
        seek($fh, $curpos, 0);
    }</code></pre>

</dd>
<dt id="seekdir-DIRHANDLE,POS"><a id="seekdir"></a><a id="seekdir-DIRHANDLE-POS"></a>seekdir DIRHANDLE,POS </dt>
<dd>

<p>Sets the current position for the <a href="CORE.html#readdir-DIRHANDLE"><code>readdir</code></a> routine on DIRHANDLE. POS must be a value returned by <a href="CORE.html#telldir-DIRHANDLE"><code>telldir</code></a>. <a href="CORE.html#seekdir-DIRHANDLE,POS"><code>seekdir</code></a> also has the same caveats about possible directory compaction as the corresponding system library routine.</p>

</dd>
<dt id="select-FILEHANDLE"><a id="select"></a>select FILEHANDLE  </dt>
<dd>

</dd>
<dt id="select1">select</dt>
<dd>

<p>Returns the currently selected filehandle. If FILEHANDLE is supplied, sets the new current default filehandle for output. This has two effects: first, a <a href="CORE.html#write-FILEHANDLE"><code>write</code></a>, <a href="CORE.html#print-FILEHANDLE-LIST"><code>print</code></a>, or <a href="CORE.html#say-FILEHANDLE-LIST"><code>say</code></a> without a filehandle default to this FILEHANDLE. Second, references to variables related to output will refer to this output channel.</p>

<p>For example, to set the top-of-form format for more than one output channel, you might do the following:</p>

<pre><code>    select(REPORT1);
    $^ = &#39;report1_top&#39;;
    select(REPORT2);
    $^ = &#39;report2_top&#39;;</code></pre>

<p>FILEHANDLE may be an expression whose value gives the name of the actual filehandle. Thus:</p>

<pre><code>    my $oldfh = select(STDERR); $| = 1; select($oldfh);</code></pre>

<p>Some programmers may prefer to think of filehandles as objects with methods, preferring to write the last example as:</p>

<pre><code>    STDERR-&gt;autoflush(1);</code></pre>

<p>(Prior to Perl version 5.14, you have to <code>use IO::Handle;</code> explicitly first.)</p>

<p>Whilst you can use <code>select</code> to temporarily &quot;capture&quot; the output of <code>print</code> like this:</p>

<pre><code>    {
        my $old_handle = select $new_handle;

        # This goes to $new_handle:
        print &quot;ok 1\n&quot;;
        ...

        select $old_handle;
    }</code></pre>

<p>you might find it easier to localize the typeglob instead:</p>

<pre><code>    {
        local *STDOUT = $new_handle;

        print &quot;ok 1\n&quot;;
        ...
    }</code></pre>

<p>The two are not exactly equivalent, but the latter might be clearer and will restore STDOUT if the wrapped code dies. The difference is that in the former, the original STDOUT can still be accessed by explicitly using it in a <code>print</code> statement (as <code>print STDOUT ...</code>), whereas in the latter the meaning of the STDOUT handle itself has temporarily been changed.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#select">&quot;select&quot; in perlport</a>.</p>

</dd>
<dt id="select-RBITS,WBITS,EBITS,TIMEOUT"><a id="select2"></a><a id="select-RBITS-WBITS-EBITS-TIMEOUT"></a>select RBITS,WBITS,EBITS,TIMEOUT </dt>
<dd>

<p>This calls the <a href="http://man.he.net/man2/select">select(2)</a> syscall with the bit masks specified, which can be constructed using <a href="CORE.html#fileno-FILEHANDLE"><code>fileno</code></a> and <a href="CORE.html#vec-EXPR,OFFSET,BITS"><code>vec</code></a>, along these lines:</p>

<pre><code>    my $rin = my $win = my $ein = &#39;&#39;;
    vec($rin, fileno(STDIN),  1) = 1;
    vec($win, fileno(STDOUT), 1) = 1;
    $ein = $rin | $win;</code></pre>

<p>If you want to select on many filehandles, you may wish to write a subroutine like this:</p>

<pre><code>    sub fhbits {
        my @fhlist = @_;
        my $bits = &quot;&quot;;
        for my $fh (@fhlist) {
            vec($bits, fileno($fh), 1) = 1;
        }
        return $bits;
    }
    my $rin = fhbits(\*STDIN, $tty, $mysock);</code></pre>

<p>The usual idiom is:</p>

<pre><code> my ($nfound, $timeleft) =
   select(my $rout = $rin, my $wout = $win, my $eout = $ein,
                                                          $timeout);</code></pre>

<p>or to block until something becomes ready just do this</p>

<pre><code> my $nfound =
   select(my $rout = $rin, my $wout = $win, my $eout = $ein, undef);</code></pre>

<p>Most systems do not bother to return anything useful in <code>$timeleft</code>, so calling <a href="CORE.html#select-RBITS,WBITS,EBITS,TIMEOUT"><code>select</code></a> in scalar context just returns <code>$nfound</code>.</p>

<p>Any of the bit masks can also be <a href="CORE.html#undef-EXPR"><code>undef</code></a>. The timeout, if specified, is in seconds, which may be fractional. Note: not all implementations are capable of returning the <code>$timeleft</code>. If not, they always return <code>$timeleft</code> equal to the supplied <code>$timeout</code>.</p>

<p>You can effect a sleep of 250 milliseconds this way:</p>

<pre><code>    select(undef, undef, undef, 0.25);</code></pre>

<p>Note that whether <a href="CORE.html#select-RBITS,WBITS,EBITS,TIMEOUT"><code>select</code></a> gets restarted after signals (say, SIGALRM) is implementation-dependent. See also <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod">perlport</a> for notes on the portability of <a href="CORE.html#select-RBITS,WBITS,EBITS,TIMEOUT"><code>select</code></a>.</p>

<p>On error, <a href="CORE.html#select-RBITS,WBITS,EBITS,TIMEOUT"><code>select</code></a> behaves just like <a href="http://man.he.net/man2/select">select(2)</a>: it returns <code>-1</code> and sets <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$!"><code>$!</code></a>.</p>

<p>On some Unixes, <a href="http://man.he.net/man2/select">select(2)</a> may report a socket file descriptor as &quot;ready for reading&quot; even when no data is available, and thus any subsequent <a href="CORE.html#read-FILEHANDLE,SCALAR,LENGTH,OFFSET"><code>read</code></a> would block. This can be avoided if you always use <code>O_NONBLOCK</code> on the socket. See <a href="http://man.he.net/man2/select">select(2)</a> and <a href="http://man.he.net/man2/fcntl">fcntl(2)</a> for further details.</p>

<p>The standard <a href="https://metacpan.org/pod/IO::Select"><code>IO::Select</code></a> module provides a user-friendlier interface to <a href="CORE.html#select-RBITS,WBITS,EBITS,TIMEOUT"><code>select</code></a>, mostly because it does all the bit-mask work for you.</p>

<p><b>WARNING</b>: One should not attempt to mix buffered I/O (like <a href="CORE.html#read-FILEHANDLE,SCALAR,LENGTH,OFFSET"><code>read</code></a> or <a href="CORE.html#readline-EXPR"><code>readline</code></a>) with <a href="CORE.html#select-RBITS,WBITS,EBITS,TIMEOUT"><code>select</code></a>, except as permitted by POSIX, and even then only on POSIX systems. You have to use <a href="CORE.html#sysread-FILEHANDLE,SCALAR,LENGTH,OFFSET"><code>sysread</code></a> instead.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#select">&quot;select&quot; in perlport</a>.</p>

</dd>
<dt id="semctl-ID,SEMNUM,CMD,ARG"><a id="semctl"></a><a id="semctl-ID-SEMNUM-CMD-ARG"></a>semctl ID,SEMNUM,CMD,ARG </dt>
<dd>

<p>Calls the System V IPC function <a href="http://man.he.net/man2/semctl">semctl(2)</a>. You&#39;ll probably have to say</p>

<pre><code>    use IPC::SysV;</code></pre>

<p>first to get the correct constant definitions. If CMD is IPC_STAT or GETALL, then ARG must be a variable that will hold the returned semid_ds structure or semaphore value array. Returns like <a href="CORE.html#ioctl-FILEHANDLE,FUNCTION,SCALAR"><code>ioctl</code></a>: the undefined value for error, &quot;<code>0 but true</code>&quot; for zero, or the actual return value otherwise. The ARG must consist of a vector of native short integers, which may be created with <code>pack(&quot;s!&quot;,(0)x$nsem)</code>. See also <a href="https://metacpan.org/pod/distribution/perl/pod/perlipc.pod#SysV-IPC">&quot;SysV IPC&quot; in perlipc</a> and the documentation for <a href="https://metacpan.org/pod/IPC::SysV"><code>IPC::SysV</code></a> and <a href="https://metacpan.org/pod/IPC::Semaphore"><code>IPC::Semaphore</code></a>.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#semctl">&quot;semctl&quot; in perlport</a>.</p>

</dd>
<dt id="semget-KEY,NSEMS,FLAGS"><a id="semget"></a><a id="semget-KEY-NSEMS-FLAGS"></a>semget KEY,NSEMS,FLAGS </dt>
<dd>

<p>Calls the System V IPC function <a href="http://man.he.net/man2/semget">semget(2)</a>. Returns the semaphore id, or the undefined value on error. See also <a href="https://metacpan.org/pod/distribution/perl/pod/perlipc.pod#SysV-IPC">&quot;SysV IPC&quot; in perlipc</a> and the documentation for <a href="https://metacpan.org/pod/IPC::SysV"><code>IPC::SysV</code></a> and <a href="https://metacpan.org/pod/IPC::Semaphore"><code>IPC::Semaphore</code></a>.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#semget">&quot;semget&quot; in perlport</a>.</p>

</dd>
<dt id="semop-KEY,OPSTRING"><a id="semop"></a><a id="semop-KEY-OPSTRING"></a>semop KEY,OPSTRING </dt>
<dd>

<p>Calls the System V IPC function <a href="http://man.he.net/man2/semop">semop(2)</a> for semaphore operations such as signalling and waiting. OPSTRING must be a packed array of semop structures. Each semop structure can be generated with <code>pack(&quot;s!3&quot;, $semnum, $semop, $semflag)</code>. The length of OPSTRING implies the number of semaphore operations. Returns true if successful, false on error. As an example, the following code waits on semaphore $semnum of semaphore id $semid:</p>

<pre><code>    my $semop = pack(&quot;s!3&quot;, $semnum, -1, 0);
    die &quot;Semaphore trouble: $!\n&quot; unless semop($semid, $semop);</code></pre>

<p>To signal the semaphore, replace <code>-1</code> with <code>1</code>. See also <a href="https://metacpan.org/pod/distribution/perl/pod/perlipc.pod#SysV-IPC">&quot;SysV IPC&quot; in perlipc</a> and the documentation for <a href="https://metacpan.org/pod/IPC::SysV"><code>IPC::SysV</code></a> and <a href="https://metacpan.org/pod/IPC::Semaphore"><code>IPC::Semaphore</code></a>.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#semop">&quot;semop&quot; in perlport</a>.</p>

</dd>
<dt id="send-SOCKET,MSG,FLAGS,TO"><a id="send"></a><a id="send-SOCKET-MSG-FLAGS-TO"></a>send SOCKET,MSG,FLAGS,TO </dt>
<dd>

</dd>
<dt id="send-SOCKET,MSG,FLAGS"><a id="send1"></a><a id="send-SOCKET-MSG-FLAGS"></a>send SOCKET,MSG,FLAGS</dt>
<dd>

<p>Sends a message on a socket. Attempts to send the scalar MSG to the SOCKET filehandle. Takes the same flags as the system call of the same name. On unconnected sockets, you must specify a destination to <i>send to</i>, in which case it does a <a href="http://man.he.net/man2/sendto">sendto(2)</a> syscall. Returns the number of characters sent, or the undefined value on error. The <a href="http://man.he.net/man2/sendmsg">sendmsg(2)</a> syscall is currently unimplemented. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlipc.pod#UDP:-Message-Passing">&quot;UDP: Message Passing&quot; in perlipc</a> for examples.</p>

<p>Note that if the socket has been marked as <code>:utf8</code>, <code>send</code> will throw an exception. The <code>:encoding(...)</code> layer implicitly introduces the <code>:utf8</code> layer. See <a href="CORE.html#binmode-FILEHANDLE,-LAYER"><code>binmode</code></a>.</p>

</dd>
<dt id="setpgrp-PID,PGRP"><a id="setpgrp"></a><a id="setpgrp-PID-PGRP"></a>setpgrp PID,PGRP  </dt>
<dd>

<p>Sets the current process group for the specified PID, <code>0</code> for the current process. Raises an exception when used on a machine that doesn&#39;t implement POSIX <a href="http://man.he.net/man2/setpgid">setpgid(2)</a> or BSD <a href="http://man.he.net/man2/setpgrp">setpgrp(2)</a>. If the arguments are omitted, it defaults to <code>0,0</code>. Note that the BSD 4.2 version of <a href="CORE.html#setpgrp-PID,PGRP"><code>setpgrp</code></a> does not accept any arguments, so only <code>setpgrp(0,0)</code> is portable. See also <a href="https://metacpan.org/pod/distribution/perl/ext/POSIX/lib/POSIX.pod#setsid"><code>POSIX::setsid()</code></a>.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#setpgrp">&quot;setpgrp&quot; in perlport</a>.</p>

</dd>
<dt id="setpriority-WHICH,WHO,PRIORITY"><a id="setpriority"></a><a id="setpriority-WHICH-WHO-PRIORITY"></a>setpriority WHICH,WHO,PRIORITY    </dt>
<dd>

<p>Sets the current priority for a process, a process group, or a user. (See <a href="http://man.he.net/man2/setpriority">setpriority(2)</a>.) Raises an exception when used on a machine that doesn&#39;t implement <a href="http://man.he.net/man2/setpriority">setpriority(2)</a>.</p>

<p><code>WHICH</code> can be any of <code>PRIO_PROCESS</code>, <code>PRIO_PGRP</code> or <code>PRIO_USER</code> imported from <a href="https://metacpan.org/pod/distribution/perl/ext/POSIX/lib/POSIX.pod#RESOURCE-CONSTANTS">&quot;RESOURCE CONSTANTS&quot; in POSIX</a>.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#setpriority">&quot;setpriority&quot; in perlport</a>.</p>

</dd>
<dt id="setsockopt-SOCKET,LEVEL,OPTNAME,OPTVAL"><a id="setsockopt"></a><a id="setsockopt-SOCKET-LEVEL-OPTNAME-OPTVAL"></a>setsockopt SOCKET,LEVEL,OPTNAME,OPTVAL </dt>
<dd>

<p>Sets the socket option requested. Returns <a href="CORE.html#undef-EXPR"><code>undef</code></a> on error. Use integer constants provided by the <a href="https://metacpan.org/pod/Socket"><code>Socket</code></a> module for LEVEL and OPNAME. Values for LEVEL can also be obtained from getprotobyname. OPTVAL might either be a packed string or an integer. An integer OPTVAL is shorthand for pack(&quot;i&quot;, OPTVAL).</p>

<p>An example disabling Nagle&#39;s algorithm on a socket:</p>

<pre><code>    use Socket qw(IPPROTO_TCP TCP_NODELAY);
    setsockopt($socket, IPPROTO_TCP, TCP_NODELAY, 1);</code></pre>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#setsockopt">&quot;setsockopt&quot; in perlport</a>.</p>

</dd>
<dt id="shift-ARRAY"><a id="shift"></a>shift ARRAY </dt>
<dd>

</dd>
<dt id="shift1">shift</dt>
<dd>

<p>Removes and returns the <b>first</b> element of an array. This shortens the array by one and moves everything down.</p>

<pre><code>    my @arr  = (&#39;cat&#39;, &#39;dog&#39;);
    my $item = shift(@arr); # &#39;cat&#39;

    # @arr is now (&#39;dog&#39;);</code></pre>

<p>Returns <code>undef</code> if the array is empty.</p>

<p><b>Note:</b> <code>shift</code> may also return <code>undef</code> if the first element in the array is <code>undef</code>.</p>

<pre><code>    my @arr  = (undef, &#39;two&#39;, &#39;three&#39;);
    my $item = shift(@arr); # undef</code></pre>

<p>If ARRAY is omitted, <code>shift</code> operates on the <code>@ARGV</code> array in the main program, and the <code>@_</code> array in subroutines. <code>shift</code> will operate on the <code>@ARGV</code> array in <code>eval STRING</code>, <code>BEGIN {}</code>, <code>INIT {}</code>, <code>CHECK {}</code> blocks.</p>

<p>Starting with Perl 5.14, an experimental feature allowed <a href="CORE.html#shift-ARRAY"><code>shift</code></a> to take a scalar expression. This experiment has been deemed unsuccessful, and was removed as of Perl 5.24.</p>

<p>See also <a href="CORE.html#unshift-ARRAY,LIST"><code>unshift</code></a>, <a href="CORE.html#push-ARRAY,LIST"><code>push</code></a>, and <a href="CORE.html#pop-ARRAY"><code>pop</code></a>. <a href="CORE.html#shift-ARRAY"><code>shift</code></a> and <a href="CORE.html#unshift-ARRAY,LIST"><code>unshift</code></a> do the same thing to the left end of an array that <a href="CORE.html#pop-ARRAY"><code>pop</code></a> and <a href="CORE.html#push-ARRAY,LIST"><code>push</code></a> do to the right end.</p>

</dd>
<dt id="shmctl-ID,CMD,ARG"><a id="shmctl"></a><a id="shmctl-ID-CMD-ARG"></a>shmctl ID,CMD,ARG </dt>
<dd>

<p>Calls the System V IPC function shmctl. You&#39;ll probably have to say</p>

<pre><code>    use IPC::SysV;</code></pre>

<p>first to get the correct constant definitions. If CMD is <code>IPC_STAT</code>, then ARG must be a variable that will hold the returned <code>shmid_ds</code> structure. Returns like ioctl: <a href="CORE.html#undef-EXPR"><code>undef</code></a> for error; &quot;<code>0</code> but true&quot; for zero; and the actual return value otherwise. See also <a href="https://metacpan.org/pod/distribution/perl/pod/perlipc.pod#SysV-IPC">&quot;SysV IPC&quot; in perlipc</a> and the documentation for <a href="https://metacpan.org/pod/IPC::SysV"><code>IPC::SysV</code></a>.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#shmctl">&quot;shmctl&quot; in perlport</a>.</p>

</dd>
<dt id="shmget-KEY,SIZE,FLAGS"><a id="shmget"></a><a id="shmget-KEY-SIZE-FLAGS"></a>shmget KEY,SIZE,FLAGS </dt>
<dd>

<p>Calls the System V IPC function shmget. Returns the shared memory segment id, or <a href="CORE.html#undef-EXPR"><code>undef</code></a> on error. See also <a href="https://metacpan.org/pod/distribution/perl/pod/perlipc.pod#SysV-IPC">&quot;SysV IPC&quot; in perlipc</a> and the documentation for <a href="https://metacpan.org/pod/IPC::SysV"><code>IPC::SysV</code></a>.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#shmget">&quot;shmget&quot; in perlport</a>.</p>

</dd>
<dt id="shmread-ID,VAR,POS,SIZE"><a id="shmread"></a><a id="shmread-ID-VAR-POS-SIZE"></a>shmread ID,VAR,POS,SIZE  </dt>
<dd>

</dd>
<dt id="shmwrite-ID,STRING,POS,SIZE"><a id="shmwrite"></a><a id="shmwrite-ID-STRING-POS-SIZE"></a>shmwrite ID,STRING,POS,SIZE</dt>
<dd>

<p>Reads or writes the System V shared memory segment ID starting at position POS for size SIZE by attaching to it, copying in/out, and detaching from it. When reading, VAR must be a variable that will hold the data read. When writing, if STRING is too long, only SIZE bytes are used; if STRING is too short, nulls are written to fill out SIZE bytes. Return true if successful, false on error. <a href="CORE.html#shmread-ID,VAR,POS,SIZE"><code>shmread</code></a> taints the variable. See also <a href="https://metacpan.org/pod/distribution/perl/pod/perlipc.pod#SysV-IPC">&quot;SysV IPC&quot; in perlipc</a> and the documentation for <a href="https://metacpan.org/pod/IPC::SysV"><code>IPC::SysV</code></a> and the <a href="../IPC::Shareable.html"><code>IPC::Shareable</code></a> module from CPAN.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#shmread">&quot;shmread&quot; in perlport</a> and <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#shmwrite">&quot;shmwrite&quot; in perlport</a>.</p>

</dd>
<dt id="shutdown-SOCKET,HOW"><a id="shutdown"></a><a id="shutdown-SOCKET-HOW"></a>shutdown SOCKET,HOW </dt>
<dd>

<p>Shuts down a socket connection in the manner indicated by HOW, which has the same interpretation as in the syscall of the same name.</p>

<pre><code>    shutdown($socket, 0);    # I/we have stopped reading data
    shutdown($socket, 1);    # I/we have stopped writing data
    shutdown($socket, 2);    # I/we have stopped using this socket</code></pre>

<p>This is useful with sockets when you want to tell the other side you&#39;re done writing but not done reading, or vice versa. It&#39;s also a more insistent form of close because it also disables the file descriptor in any forked copies in other processes.</p>

<p>Returns <code>1</code> for success; on error, returns <a href="CORE.html#undef-EXPR"><code>undef</code></a> if the first argument is not a valid filehandle, or returns <code>0</code> and sets <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$!"><code>$!</code></a> for any other failure.</p>

</dd>
<dt id="sin-EXPR"><a id="sin"></a>sin EXPR    </dt>
<dd>

</dd>
<dt id="sin1">sin</dt>
<dd>

<p>Returns the sine of EXPR (expressed in radians). If EXPR is omitted, returns sine of <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a>.</p>

<p>For the inverse sine operation, you may use the <code>Math::Trig::asin</code> function, or use this relation:</p>

<pre><code>    sub asin { atan2($_[0], sqrt(1 - $_[0] * $_[0])) }</code></pre>

</dd>
<dt id="sleep-EXPR"><a id="sleep"></a>sleep EXPR  </dt>
<dd>

</dd>
<dt id="sleep1">sleep</dt>
<dd>

<p>Causes the script to sleep for (integer) EXPR seconds, or forever if no argument is given. Returns the integer number of seconds actually slept.</p>

<p>EXPR should be a positive integer. If called with a negative integer, <a href="CORE.html#sleep-EXPR"><code>sleep</code></a> does not sleep but instead emits a warning, sets <code>$!</code> (<code>errno</code>), and returns zero.</p>

<p>If called with a non-integer, the fractional part is ignored.</p>

<p><code>sleep 0</code> is permitted, but a function call to the underlying platform implementation still occurs, with any side effects that may have. <code>sleep 0</code> is therefore not exactly identical to not sleeping at all.</p>

<p>May be interrupted if the process receives a signal such as <code>SIGALRM</code>.</p>

<pre><code>    eval {
        local $SIG{ALRM} = sub { die &quot;Alarm!\n&quot; };
        sleep;
    };
    die $@ unless $@ eq &quot;Alarm!\n&quot;;</code></pre>

<p>You probably cannot mix <a href="CORE.html#alarm-SECONDS"><code>alarm</code></a> and <a href="CORE.html#sleep-EXPR"><code>sleep</code></a> calls, because <a href="CORE.html#sleep-EXPR"><code>sleep</code></a> is often implemented using <a href="CORE.html#alarm-SECONDS"><code>alarm</code></a>.</p>

<p>On some older systems, it may sleep up to a full second less than what you requested, depending on how it counts seconds. Most modern systems always sleep the full amount. They may appear to sleep longer than that, however, because your process might not be scheduled right away in a busy multitasking system.</p>

<p>For delays of finer granularity than one second, the <a href="https://metacpan.org/pod/Time::HiRes">Time::HiRes</a> module (from CPAN, and starting from Perl 5.8 part of the standard distribution) provides <a href="https://metacpan.org/pod/Time::HiRes#usleep-(-$useconds-)"><code>usleep</code></a>. You may also use Perl&#39;s four-argument version of <a href="CORE.html#select-RBITS,WBITS,EBITS,TIMEOUT"><code>select</code></a> leaving the first three arguments undefined, or you might be able to use the <a href="CORE.html#syscall-NUMBER,-LIST"><code>syscall</code></a> interface to access <a href="http://man.he.net/man2/setitimer">setitimer(2)</a> if your system supports it. See <a href="https://metacpan.org/pod/perlfaq8">perlfaq8</a> for details.</p>

<p>See also the <a href="https://metacpan.org/pod/distribution/perl/ext/POSIX/lib/POSIX.pod">POSIX</a> module&#39;s <a href="https://metacpan.org/pod/distribution/perl/ext/POSIX/lib/POSIX.pod#pause"><code>pause</code></a> function.</p>

</dd>
<dt id="socket-SOCKET,DOMAIN,TYPE,PROTOCOL"><a id="socket"></a><a id="socket-SOCKET-DOMAIN-TYPE-PROTOCOL"></a>socket SOCKET,DOMAIN,TYPE,PROTOCOL </dt>
<dd>

<p>Opens a socket of the specified kind and attaches it to filehandle SOCKET. DOMAIN, TYPE, and PROTOCOL are specified the same as for the syscall of the same name. You should <code>use Socket</code> first to get the proper definitions imported. See the examples in <a href="https://metacpan.org/pod/distribution/perl/pod/perlipc.pod#Sockets:-Client/Server-Communication">&quot;Sockets: Client/Server Communication&quot; in perlipc</a>.</p>

<p>On systems that support a close-on-exec flag on files, the flag will be set for the newly opened file descriptor, as determined by the value of <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$%5EF"><code>$^F</code></a>. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$%5EF">&quot;$^F&quot; in perlvar</a>.</p>

</dd>
<dt id="socketpair-SOCKET1,SOCKET2,DOMAIN,TYPE,PROTOCOL"><a id="socketpair"></a><a id="socketpair-SOCKET1-SOCKET2-DOMAIN-TYPE-PROTOCOL"></a>socketpair SOCKET1,SOCKET2,DOMAIN,TYPE,PROTOCOL </dt>
<dd>

<p>Creates an unnamed pair of sockets in the specified domain, of the specified type. DOMAIN, TYPE, and PROTOCOL are specified the same as for the syscall of the same name. If unimplemented, raises an exception. Returns true if successful.</p>

<p>On systems that support a close-on-exec flag on files, the flag will be set for the newly opened file descriptors, as determined by the value of <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$%5EF"><code>$^F</code></a>. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$%5EF">&quot;$^F&quot; in perlvar</a>.</p>

<p>Some systems define <a href="CORE.html#pipe-READHANDLE,WRITEHANDLE"><code>pipe</code></a> in terms of <a href="CORE.html#socketpair-SOCKET1,SOCKET2,DOMAIN,TYPE,PROTOCOL"><code>socketpair</code></a>, in which a call to <code>pipe($rdr, $wtr)</code> is essentially:</p>

<pre><code>    use Socket;
    socketpair(my $rdr, my $wtr, AF_UNIX, SOCK_STREAM, PF_UNSPEC);
    shutdown($rdr, 1);        # no more writing for reader
    shutdown($wtr, 0);        # no more reading for writer</code></pre>

<p>See <a href="https://metacpan.org/pod/distribution/perl/pod/perlipc.pod">perlipc</a> for an example of socketpair use. Perl 5.8 and later will emulate socketpair using IP sockets to localhost if your system implements sockets but not socketpair.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#socketpair">&quot;socketpair&quot; in perlport</a>.</p>

</dd>
<dt id="sort-SUBNAME-LIST"><a id="sort"></a>sort SUBNAME LIST </dt>
<dd>

</dd>
<dt id="sort-BLOCK-LIST"><a id="sort1"></a>sort BLOCK LIST</dt>
<dd>

</dd>
<dt id="sort-LIST"><a id="sort2"></a>sort LIST</dt>
<dd>

<p>In list context, this sorts the LIST and returns the sorted list value. In scalar context, the behaviour of <a href="CORE.html#sort-SUBNAME-LIST"><code>sort</code></a> is undefined.</p>

<p>If SUBNAME or BLOCK is omitted, <a href="CORE.html#sort-SUBNAME-LIST"><code>sort</code></a>s in standard string comparison order. If SUBNAME is specified, it gives the name of a subroutine that returns a numeric value less than, equal to, or greater than <code>0</code>, depending on how the elements of the list are to be ordered. (The <code>&lt;=&gt;</code> and <code>cmp</code> operators are extremely useful in such routines.) SUBNAME may be a scalar variable name (unsubscripted), in which case the value provides the name of (or a reference to) the actual subroutine to use. In place of a SUBNAME, you can provide a BLOCK as an anonymous, in-line sort subroutine.</p>

<p>If the subroutine&#39;s prototype is <code>($$)</code>, the elements to be compared are passed by reference in <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#@_"><code>@_</code></a>, as for a normal subroutine. This is slower than unprototyped subroutines, where the elements to be compared are passed into the subroutine as the package global variables <code>$a</code> and <code>$b</code> (see example below).</p>

<p>If the subroutine is an XSUB, the elements to be compared are pushed on to the stack, the way arguments are usually passed to XSUBs. <code>$a</code> and <code>$b</code> are not set.</p>

<p>The values to be compared are always passed by reference and should not be modified.</p>

<p>You also cannot exit out of the sort block or subroutine using any of the loop control operators described in <a href="https://metacpan.org/pod/distribution/perl/pod/perlsyn.pod">perlsyn</a> or with <a href="CORE.html#goto-LABEL"><code>goto</code></a>.</p>

<p>When <a href="https://metacpan.org/pod/locale"><code>use locale</code></a> (but not <code>use locale &#39;:not_characters&#39;</code>) is in effect, <code>sort LIST</code> sorts LIST according to the current collation locale. See <a href="https://metacpan.org/pod/distribution/perl/pod/perllocale.pod">perllocale</a>.</p>

<p><a href="CORE.html#sort-SUBNAME-LIST"><code>sort</code></a> returns aliases into the original list, much as a for loop&#39;s index variable aliases the list elements. That is, modifying an element of a list returned by <a href="CORE.html#sort-SUBNAME-LIST"><code>sort</code></a> (for example, in a <code>foreach</code>, <a href="CORE.html#map-BLOCK-LIST"><code>map</code></a> or <a href="CORE.html#grep-BLOCK-LIST"><code>grep</code></a>) actually modifies the element in the original list. This is usually something to be avoided when writing clear code.</p>

<p>Historically Perl has varied in whether sorting is stable by default. If stability matters, it can be controlled explicitly by using the <a href="https://metacpan.org/pod/sort">sort</a> pragma.</p>

<p>Examples:</p>

<pre><code>    # sort lexically
    my @articles = sort @files;

    # same thing, but with explicit sort routine
    my @articles = sort {$a cmp $b} @files;

    # now case-insensitively
    my @articles = sort {fc($a) cmp fc($b)} @files;

    # same thing in reversed order
    my @articles = sort {$b cmp $a} @files;

    # sort numerically ascending
    my @articles = sort {$a &lt;=&gt; $b} @files;

    # sort numerically descending
    my @articles = sort {$b &lt;=&gt; $a} @files;

    # this sorts the %age hash by value instead of key
    # using an in-line function
    my @eldest = sort { $age{$b} &lt;=&gt; $age{$a} } keys %age;

    # sort using explicit subroutine name
    sub byage {
        $age{$a} &lt;=&gt; $age{$b};  # presuming numeric
    }
    my @sortedclass = sort byage @class;

    sub backwards { $b cmp $a }
    my @harry  = qw(dog cat x Cain Abel);
    my @george = qw(gone chased yz Punished Axed);
    print sort @harry;
        # prints AbelCaincatdogx
    print sort backwards @harry;
        # prints xdogcatCainAbel
    print sort @george, &#39;to&#39;, @harry;
        # prints AbelAxedCainPunishedcatchaseddoggonetoxyz

    # inefficiently sort by descending numeric compare using
    # the first integer after the first = sign, or the
    # whole record case-insensitively otherwise

    my @new = sort {
        ($b =~ /=(\d+)/)[0] &lt;=&gt; ($a =~ /=(\d+)/)[0]
                            ||
                    fc($a)  cmp  fc($b)
    } @old;

    # same thing, but much more efficiently;
    # we&#39;ll build auxiliary indices instead
    # for speed
    my (@nums, @caps);
    for (@old) {
        push @nums, ( /=(\d+)/ ? $1 : undef );
        push @caps, fc($_);
    }

    my @new = @old[ sort {
                           $nums[$b] &lt;=&gt; $nums[$a]
                                    ||
                           $caps[$a] cmp $caps[$b]
                         } 0..$#old
                  ];

    # same thing, but without any temps
    my @new = map { $_-&gt;[0] }
           sort { $b-&gt;[1] &lt;=&gt; $a-&gt;[1]
                           ||
                  $a-&gt;[2] cmp $b-&gt;[2]
           } map { [$_, /=(\d+)/, fc($_)] } @old;

    # using a prototype allows you to use any comparison subroutine
    # as a sort subroutine (including other package&#39;s subroutines)
    package Other;
    sub backwards ($$) { $_[1] cmp $_[0]; }  # $a and $b are
                                             # not set here
    package main;
    my @new = sort Other::backwards @old;

    ## using a prototype with function signature
    use feature &#39;signatures&#39;;
    sub function_with_signature :prototype($$) ($one, $two) {
        return $one &lt;=&gt; $two
    }

    my @new = sort function_with_signature @old;

    # guarantee stability
    use sort &#39;stable&#39;;
    my @new = sort { substr($a, 3, 5) cmp substr($b, 3, 5) } @old;</code></pre>

<p>Warning: syntactical care is required when sorting the list returned from a function. If you want to sort the list returned by the function call <code>find_records(@key)</code>, you can use:</p>

<pre><code>    my @contact = sort { $a cmp $b } find_records @key;
    my @contact = sort +find_records(@key);
    my @contact = sort &amp;find_records(@key);
    my @contact = sort(find_records(@key));</code></pre>

<p>If instead you want to sort the array <code>@key</code> with the comparison routine <code>find_records()</code> then you can use:</p>

<pre><code>    my @contact = sort { find_records() } @key;
    my @contact = sort find_records(@key);
    my @contact = sort(find_records @key);
    my @contact = sort(find_records (@key));</code></pre>

<p><code>$a</code> and <code>$b</code> are set as package globals in the package the sort() is called from. That means <code>$main::a</code> and <code>$main::b</code> (or <code>$::a</code> and <code>$::b</code>) in the <code>main</code> package, <code>$FooPack::a</code> and <code>$FooPack::b</code> in the <code>FooPack</code> package, etc. If the sort block is in scope of a <code>my</code> or <code>state</code> declaration of <code>$a</code> and/or <code>$b</code>, you <i>must</i> spell out the full name of the variables in the sort block :</p>

<pre><code>   package main;
   my $a = &quot;C&quot;; # DANGER, Will Robinson, DANGER !!!

   print sort { $a cmp $b }               qw(A C E G B D F H);
                                          # WRONG
   sub badlexi { $a cmp $b }
   print sort badlexi                     qw(A C E G B D F H);
                                          # WRONG
   # the above prints BACFEDGH or some other incorrect ordering

   print sort { $::a cmp $::b }           qw(A C E G B D F H);
                                          # OK
   print sort { our $a cmp our $b }       qw(A C E G B D F H);
                                          # also OK
   print sort { our ($a, $b); $a cmp $b } qw(A C E G B D F H);
                                          # also OK
   sub lexi { our $a cmp our $b }
   print sort lexi                        qw(A C E G B D F H);
                                          # also OK
   # the above print ABCDEFGH</code></pre>

<p>With proper care you may mix package and my (or state) <code>$a</code> and/or <code>$b</code>:</p>

<pre><code>   my $a = {
      tiny   =&gt; -2,
      small  =&gt; -1,
      normal =&gt; 0,
      big    =&gt; 1,
      huge   =&gt; 2
   };

   say sort { $a-&gt;{our $a} &lt;=&gt; $a-&gt;{our $b} }
       qw{ huge normal tiny small big};

   # prints tinysmallnormalbighuge</code></pre>

<p><code>$a</code> and <code>$b</code> are implicitly local to the sort() execution and regain their former values upon completing the sort.</p>

<p>Sort subroutines written using <code>$a</code> and <code>$b</code> are bound to their calling package. It is possible, but of limited interest, to define them in a different package, since the subroutine must still refer to the calling package&#39;s <code>$a</code> and <code>$b</code> :</p>

<pre><code>   package Foo;
   sub lexi { $Bar::a cmp $Bar::b }
   package Bar;
   ... sort Foo::lexi ...</code></pre>

<p>Use the prototyped versions (see above) for a more generic alternative.</p>

<p>The comparison function is required to behave. If it returns inconsistent results (sometimes saying <code>$x[1]</code> is less than <code>$x[2]</code> and sometimes saying the opposite, for example) the results are not well-defined.</p>

<p>Because <code>&lt;=&gt;</code> returns <a href="CORE.html#undef-EXPR"><code>undef</code></a> when either operand is <code>NaN</code> (not-a-number), be careful when sorting with a comparison function like <code>$a &lt;=&gt; $b</code> any lists that might contain a <code>NaN</code>. The following example takes advantage that <code>NaN != NaN</code> to eliminate any <code>NaN</code>s from the input list.</p>

<pre><code>    my @result = sort { $a &lt;=&gt; $b } grep { $_ == $_ } @input;</code></pre>

<p>In this version of <i>perl</i>, the <code>sort</code> function is implemented via the mergesort algorithm.</p>

</dd>
<dt id="splice-ARRAY,OFFSET,LENGTH,LIST"><a id="splice"></a><a id="splice-ARRAY-OFFSET-LENGTH-LIST"></a>splice ARRAY,OFFSET,LENGTH,LIST </dt>
<dd>

</dd>
<dt id="splice-ARRAY,OFFSET,LENGTH"><a id="splice1"></a><a id="splice-ARRAY-OFFSET-LENGTH"></a>splice ARRAY,OFFSET,LENGTH</dt>
<dd>

</dd>
<dt id="splice-ARRAY,OFFSET"><a id="splice2"></a><a id="splice-ARRAY-OFFSET"></a>splice ARRAY,OFFSET</dt>
<dd>

</dd>
<dt id="splice-ARRAY"><a id="splice3"></a>splice ARRAY</dt>
<dd>

<p>Removes the elements designated by OFFSET and LENGTH from an array, and replaces them with the elements of LIST, if any. In list context, returns the elements removed from the array. In scalar context, returns the last element removed, or <a href="CORE.html#undef-EXPR"><code>undef</code></a> if no elements are removed. The array grows or shrinks as necessary. If OFFSET is negative then it starts that far from the end of the array. If LENGTH is omitted, removes everything from OFFSET onward. If LENGTH is negative, removes the elements from OFFSET onward except for -LENGTH elements at the end of the array. If both OFFSET and LENGTH are omitted, removes everything. If OFFSET is past the end of the array and a LENGTH was provided, Perl issues a warning, and splices at the end of the array.</p>

<p>The following equivalences hold (assuming <code>$#a &gt;= $i</code> )</p>

<pre><code>    push(@a,$x,$y)      splice(@a,@a,0,$x,$y)
    pop(@a)             splice(@a,-1)
    shift(@a)           splice(@a,0,1)
    unshift(@a,$x,$y)   splice(@a,0,0,$x,$y)
    $a[$i] = $y         splice(@a,$i,1,$y)</code></pre>

<p><a href="CORE.html#splice-ARRAY,OFFSET,LENGTH,LIST"><code>splice</code></a> can be used, for example, to implement n-ary queue processing:</p>

<pre><code>    sub nary_print {
      my $n = shift;
      while (my @next_n = splice @_, 0, $n) {
        say join q{ -- }, @next_n;
      }
    }

    nary_print(3, qw(a b c d e f g h));
    # prints:
    #   a -- b -- c
    #   d -- e -- f
    #   g -- h</code></pre>

<p>Starting with Perl 5.14, an experimental feature allowed <a href="CORE.html#splice-ARRAY,OFFSET,LENGTH,LIST"><code>splice</code></a> to take a scalar expression. This experiment has been deemed unsuccessful, and was removed as of Perl 5.24.</p>

</dd>
<dt id="split-/PATTERN/,EXPR,LIMIT"><a id="split"></a><a id="split--PATTERN-EXPR-LIMIT"></a>split /PATTERN/,EXPR,LIMIT </dt>
<dd>

</dd>
<dt id="split-/PATTERN/,EXPR"><a id="split1"></a><a id="split--PATTERN-EXPR"></a>split /PATTERN/,EXPR</dt>
<dd>

</dd>
<dt id="split-/PATTERN/"><a id="split2"></a><a id="split--PATTERN"></a>split /PATTERN/</dt>
<dd>

</dd>
<dt id="split3">split</dt>
<dd>

<p>Splits the string EXPR into a list of strings and returns the list in list context, or the size of the list in scalar context. (Prior to Perl 5.11, it also overwrote <code>@_</code> with the list in void and scalar context. If you target old perls, beware.)</p>

<p>If only PATTERN is given, EXPR defaults to <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a>.</p>

<p>Anything in EXPR that matches PATTERN is taken to be a separator that separates the EXPR into substrings (called &quot;<i>fields</i>&quot;) that do <b>not</b> include the separator. Note that a separator may be longer than one character or even have no characters at all (the empty string, which is a zero-width match).</p>

<p>The PATTERN need not be constant; an expression may be used to specify a pattern that varies at runtime.</p>

<p>If PATTERN matches the empty string, the EXPR is split at the match position (between characters). As an example, the following:</p>

<pre><code>    my @x = split(/b/, &quot;abc&quot;); # (&quot;a&quot;, &quot;c&quot;)</code></pre>

<p>uses the <code>b</code> in <code>&#39;abc&#39;</code> as a separator to produce the list (&quot;a&quot;, &quot;c&quot;). However, this:</p>

<pre><code>    my @x = split(//, &quot;abc&quot;); # (&quot;a&quot;, &quot;b&quot;, &quot;c&quot;)</code></pre>

<p>uses empty string matches as separators; thus, the empty string may be used to split EXPR into a list of its component characters.</p>

<p>As a special case for <a href="CORE.html#split-/PATTERN/,EXPR,LIMIT"><code>split</code></a>, the empty pattern given in <a href="https://metacpan.org/pod/distribution/perl/pod/perlop.pod#m/PATTERN/msixpodualngc">match operator</a> syntax (<code>//</code>) specifically matches the empty string, which is contrary to its usual interpretation as the last successful match.</p>

<p>If PATTERN is <code>/^/</code>, then it is treated as if it used the <a href="https://metacpan.org/pod/distribution/perl/pod/perlreref.pod#OPERATORS">multiline modifier</a> (<code>/^/m</code>), since it isn&#39;t much use otherwise.</p>

<p><code>/m</code> and any of the other pattern modifiers valid for <code>qr</code> (summarized in <a href="https://metacpan.org/pod/distribution/perl/pod/perlop.pod#qr/STRING/msixpodualn">&quot;qr/STRING/msixpodualn&quot; in perlop</a>) may be specified explicitly.</p>

<p>As another special case, <a href="CORE.html#split-/PATTERN/,EXPR,LIMIT"><code>split</code></a> emulates the default behavior of the command line tool <b>awk</b> when the PATTERN is either omitted or a string composed of a single space character (such as <span style="white-space: nowrap;"><code>&#39; &#39;</code></span> or <span style="white-space: nowrap;"><code>&quot;\x20&quot;</code></span>, but not e.g. <span style="white-space: nowrap;"><code>/ /</code></span>). In this case, any leading whitespace in EXPR is removed before splitting occurs, and the PATTERN is instead treated as if it were <code>/\s+/</code>; in particular, this means that <i>any</i> contiguous whitespace (not just a single space character) is used as a separator.</p>

<pre><code>    my @x = split(&quot; &quot;, &quot;  Quick brown fox\n&quot;);
    # (&quot;Quick&quot;, &quot;brown&quot;, &quot;fox&quot;)

    my @x = split(&quot; &quot;, &quot;RED\tGREEN\tBLUE&quot;);
    # (&quot;RED&quot;, &quot;GREEN&quot;, &quot;BLUE&quot;)</code></pre>

<p>Using split in this fashion is very similar to how <a href="CORE.html#qw/STRING/"><code>qw//</code></a> works.</p>

<p>However, this special treatment can be avoided by specifying the pattern <span style="white-space: nowrap;"><code>/ /</code></span> instead of the string <span style="white-space: nowrap;"><code>&quot; &quot;</code></span>, thereby allowing only a single space character to be a separator. In earlier Perls this special case was restricted to the use of a plain <span style="white-space: nowrap;"><code>&quot; &quot;</code></span> as the pattern argument to split; in Perl 5.18.0 and later this special case is triggered by any expression which evaluates to the simple string <span style="white-space: nowrap;"><code>&quot; &quot;</code></span>.</p>

<p>As of Perl 5.28, this special-cased whitespace splitting works as expected in the scope of <a href="https://metacpan.org/pod/feature#The-&#39;unicode_strings&#39;-feature"><span style="white-space: nowrap;"><code>&quot;use feature &#39;unicode_strings&#39;&quot;</code></span></a>. In previous versions, and outside the scope of that feature, it exhibits <a href="https://metacpan.org/pod/distribution/perl/pod/perlunicode.pod#The-%22Unicode-Bug%22">&quot;The &quot;Unicode Bug&quot;&quot; in perlunicode</a>: characters that are whitespace according to Unicode rules but not according to ASCII rules can be treated as part of fields rather than as field separators, depending on the string&#39;s internal encoding.</p>

<p>If omitted, PATTERN defaults to a single space, <span style="white-space: nowrap;"><code>&quot; &quot;</code></span>, triggering the previously described <i>awk</i> emulation.</p>

<p>If LIMIT is specified and positive, it represents the maximum number of fields into which the EXPR may be split; in other words, LIMIT is one greater than the maximum number of times EXPR may be split. Thus, the LIMIT value <code>1</code> means that EXPR may be split a maximum of zero times, producing a maximum of one field (namely, the entire value of EXPR). For instance:</p>

<pre><code>    my @x = split(//, &quot;abc&quot;, 1); # (&quot;abc&quot;)
    my @x = split(//, &quot;abc&quot;, 2); # (&quot;a&quot;, &quot;bc&quot;)
    my @x = split(//, &quot;abc&quot;, 3); # (&quot;a&quot;, &quot;b&quot;, &quot;c&quot;)
    my @x = split(//, &quot;abc&quot;, 4); # (&quot;a&quot;, &quot;b&quot;, &quot;c&quot;)</code></pre>

<p>If LIMIT is negative, it is treated as if it were instead arbitrarily large; as many fields as possible are produced.</p>

<p>If LIMIT is omitted (or, equivalently, zero), then it is usually treated as if it were instead negative but with the exception that trailing empty fields are stripped (empty leading fields are always preserved); if all fields are empty, then all fields are considered to be trailing (and are thus stripped in this case). Thus, the following:</p>

<pre><code>    my @x = split(/,/, &quot;a,b,c,,,&quot;); # (&quot;a&quot;, &quot;b&quot;, &quot;c&quot;)</code></pre>

<p>produces only a three element list.</p>

<pre><code>    my @x = split(/,/, &quot;a,b,c,,,&quot;, -1); # (&quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;)</code></pre>

<p>produces a six element list.</p>

<p>In time-critical applications, it is worthwhile to avoid splitting into more fields than necessary. Thus, when assigning to a list, if LIMIT is omitted (or zero), then LIMIT is treated as though it were one larger than the number of variables in the list; for the following, LIMIT is implicitly 3:</p>

<pre><code>    my ($login, $passwd) = split(/:/);</code></pre>

<p>Note that splitting an EXPR that evaluates to the empty string always produces zero fields, regardless of the LIMIT specified.</p>

<p>An empty leading field is produced when there is a positive-width match at the beginning of EXPR. For instance:</p>

<pre><code>    my @x = split(/ /, &quot; abc&quot;); # (&quot;&quot;, &quot;abc&quot;)</code></pre>

<p>splits into two elements. However, a zero-width match at the beginning of EXPR never produces an empty field, so that:</p>

<pre><code>    my @x = split(//, &quot; abc&quot;); # (&quot; &quot;, &quot;a&quot;, &quot;b&quot;, &quot;c&quot;)</code></pre>

<p>splits into four elements instead of five.</p>

<p>An empty trailing field, on the other hand, is produced when there is a match at the end of EXPR, regardless of the length of the match (of course, unless a non-zero LIMIT is given explicitly, such fields are removed, as in the last example). Thus:</p>

<pre><code>    my @x = split(//, &quot; abc&quot;, -1); # (&quot; &quot;, &quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;&quot;)</code></pre>

<p>If the PATTERN contains <a href="https://metacpan.org/pod/distribution/perl/pod/perlretut.pod#Grouping-things-and-hierarchical-matching">capturing groups</a>, then for each separator, an additional field is produced for each substring captured by a group (in the order in which the groups are specified, as per <a href="https://metacpan.org/pod/distribution/perl/pod/perlretut.pod#Backreferences">backreferences</a>); if any group does not match, then it captures the <a href="CORE.html#undef-EXPR"><code>undef</code></a> value instead of a substring. Also, note that any such additional field is produced whenever there is a separator (that is, whenever a split occurs), and such an additional field does <b>not</b> count towards the LIMIT. Consider the following expressions evaluated in list context (each returned list is provided in the associated comment):</p>

<pre><code>    my @x = split(/-|,/    , &quot;1-10,20&quot;, 3);
    # (&quot;1&quot;, &quot;10&quot;, &quot;20&quot;)

    my @x = split(/(-|,)/  , &quot;1-10,20&quot;, 3);
    # (&quot;1&quot;, &quot;-&quot;, &quot;10&quot;, &quot;,&quot;, &quot;20&quot;)

    my @x = split(/-|(,)/  , &quot;1-10,20&quot;, 3);
    # (&quot;1&quot;, undef, &quot;10&quot;, &quot;,&quot;, &quot;20&quot;)

    my @x = split(/(-)|,/  , &quot;1-10,20&quot;, 3);
    # (&quot;1&quot;, &quot;-&quot;, &quot;10&quot;, undef, &quot;20&quot;)

    my @x = split(/(-)|(,)/, &quot;1-10,20&quot;, 3);
    # (&quot;1&quot;, &quot;-&quot;, undef, &quot;10&quot;, undef, &quot;,&quot;, &quot;20&quot;)</code></pre>

</dd>
<dt id="sprintf-FORMAT,-LIST"><a id="sprintf"></a><a id="sprintf-FORMAT--LIST"></a>sprintf FORMAT, LIST </dt>
<dd>

<p>Returns a string formatted by the usual <a href="CORE.html#printf-FILEHANDLE-FORMAT,-LIST"><code>printf</code></a> conventions of the C library function <a href="CORE.html#sprintf-FORMAT,-LIST"><code>sprintf</code></a>. See below for more details and see <a href="http://man.he.net/man3/sprintf">sprintf(3)</a> or <a href="http://man.he.net/man3/printf">printf(3)</a> on your system for an explanation of the general principles.</p>

<p>For example:</p>

<pre><code>        # Format number with up to 8 leading zeroes
        my $result = sprintf(&quot;%08d&quot;, $number);

        # Round number to 3 digits after decimal point
        my $rounded = sprintf(&quot;%.3f&quot;, $number);</code></pre>

<p>Perl does its own <a href="CORE.html#sprintf-FORMAT,-LIST"><code>sprintf</code></a> formatting: it emulates the C function <a href="http://man.he.net/man3/sprintf">sprintf(3)</a>, but doesn&#39;t use it except for floating-point numbers, and even then only standard modifiers are allowed. Non-standard extensions in your local <a href="http://man.he.net/man3/sprintf">sprintf(3)</a> are therefore unavailable from Perl.</p>

<p>Unlike <a href="CORE.html#printf-FILEHANDLE-FORMAT,-LIST"><code>printf</code></a>, <a href="CORE.html#sprintf-FORMAT,-LIST"><code>sprintf</code></a> does not do what you probably mean when you pass it an array as your first argument. The array is given scalar context, and instead of using the 0th element of the array as the format, Perl will use the count of elements in the array as the format, which is almost never useful.</p>

<p>Perl&#39;s <a href="CORE.html#sprintf-FORMAT,-LIST"><code>sprintf</code></a> permits the following universally-known conversions:</p>

<pre><code>   %%    a percent sign
   %c    a character with the given number
   %s    a string
   %d    a signed integer, in decimal
   %u    an unsigned integer, in decimal
   %o    an unsigned integer, in octal
   %x    an unsigned integer, in hexadecimal
   %e    a floating-point number, in scientific notation
   %f    a floating-point number, in fixed decimal notation
   %g    a floating-point number, in %e or %f notation</code></pre>

<p>In addition, Perl permits the following widely-supported conversions:</p>

<pre><code>   %X    like %x, but using upper-case letters
   %E    like %e, but using an upper-case &quot;E&quot;
   %G    like %g, but with an upper-case &quot;E&quot; (if applicable)
   %b    an unsigned integer, in binary
   %B    like %b, but using an upper-case &quot;B&quot; with the # flag
   %p    a pointer (outputs the Perl value&#39;s address in hexadecimal)
   %n    special: *stores* the number of characters output so far
         into the next argument in the parameter list
   %a    hexadecimal floating point
   %A    like %a, but using upper-case letters</code></pre>

<p>Finally, for backward (and we do mean &quot;backward&quot;) compatibility, Perl permits these unnecessary but widely-supported conversions:</p>

<pre><code>   %i    a synonym for %d
   %D    a synonym for %ld
   %U    a synonym for %lu
   %O    a synonym for %lo
   %F    a synonym for %f</code></pre>

<p>Note that the number of exponent digits in the scientific notation produced by <code>%e</code>, <code>%E</code>, <code>%g</code> and <code>%G</code> for numbers with the modulus of the exponent less than 100 is system-dependent: it may be three or less (zero-padded as necessary). In other words, 1.23 times ten to the 99th may be either &quot;1.23e99&quot; or &quot;1.23e099&quot;. Similarly for <code>%a</code> and <code>%A</code>: the exponent or the hexadecimal digits may float: especially the &quot;long doubles&quot; Perl configuration option may cause surprises.</p>

<p>Between the <code>%</code> and the format letter, you may specify several additional attributes controlling the interpretation of the format. In order, these are:</p>

<dl>

<dt id="format-parameter-index"><a id="format1"></a>format parameter index</dt>
<dd>

<p>An explicit format parameter index, such as <code>2$</code>. By default sprintf will format the next unused argument in the list, but this allows you to take the arguments out of order:</p>

<pre><code>  printf &#39;%2$d %1$d&#39;, 12, 34;      # prints &quot;34 12&quot;
  printf &#39;%3$d %d %1$d&#39;, 1, 2, 3;  # prints &quot;3 1 1&quot;</code></pre>

</dd>
<dt id="flags">flags</dt>
<dd>

<p>one or more of:</p>

<pre><code>   space   prefix non-negative number with a space
   +       prefix non-negative number with a plus sign
   -       left-justify within the field
   0       use zeros, not spaces, to right-justify
   #       ensure the leading &quot;0&quot; for any octal,
           prefix non-zero hexadecimal with &quot;0x&quot; or &quot;0X&quot;,
           prefix non-zero binary with &quot;0b&quot; or &quot;0B&quot;</code></pre>

<p>For example:</p>

<pre><code>  printf &#39;&lt;% d&gt;&#39;,  12;   # prints &quot;&lt; 12&gt;&quot;
  printf &#39;&lt;% d&gt;&#39;,   0;   # prints &quot;&lt; 0&gt;&quot;
  printf &#39;&lt;% d&gt;&#39;, -12;   # prints &quot;&lt;-12&gt;&quot;
  printf &#39;&lt;%+d&gt;&#39;,  12;   # prints &quot;&lt;+12&gt;&quot;
  printf &#39;&lt;%+d&gt;&#39;,   0;   # prints &quot;&lt;+0&gt;&quot;
  printf &#39;&lt;%+d&gt;&#39;, -12;   # prints &quot;&lt;-12&gt;&quot;
  printf &#39;&lt;%6s&gt;&#39;,  12;   # prints &quot;&lt;    12&gt;&quot;
  printf &#39;&lt;%-6s&gt;&#39;, 12;   # prints &quot;&lt;12    &gt;&quot;
  printf &#39;&lt;%06s&gt;&#39;, 12;   # prints &quot;&lt;000012&gt;&quot;
  printf &#39;&lt;%#o&gt;&#39;,  12;   # prints &quot;&lt;014&gt;&quot;
  printf &#39;&lt;%#x&gt;&#39;,  12;   # prints &quot;&lt;0xc&gt;&quot;
  printf &#39;&lt;%#X&gt;&#39;,  12;   # prints &quot;&lt;0XC&gt;&quot;
  printf &#39;&lt;%#b&gt;&#39;,  12;   # prints &quot;&lt;0b1100&gt;&quot;
  printf &#39;&lt;%#B&gt;&#39;,  12;   # prints &quot;&lt;0B1100&gt;&quot;</code></pre>

<p>When a space and a plus sign are given as the flags at once, the space is ignored.</p>

<pre><code>  printf &#39;&lt;%+ d&gt;&#39;, 12;   # prints &quot;&lt;+12&gt;&quot;
  printf &#39;&lt;% +d&gt;&#39;, 12;   # prints &quot;&lt;+12&gt;&quot;</code></pre>

<p>When the # flag and a precision are given in the %o conversion, the precision is incremented if it&#39;s necessary for the leading &quot;0&quot;.</p>

<pre><code>  printf &#39;&lt;%#.5o&gt;&#39;, 012;      # prints &quot;&lt;00012&gt;&quot;
  printf &#39;&lt;%#.5o&gt;&#39;, 012345;   # prints &quot;&lt;012345&gt;&quot;
  printf &#39;&lt;%#.0o&gt;&#39;, 0;        # prints &quot;&lt;0&gt;&quot;</code></pre>

</dd>
<dt id="vector-flag"><a id="vector"></a>vector flag</dt>
<dd>

<p>This flag tells Perl to interpret the supplied string as a vector of integers, one for each character in the string. Perl applies the format to each integer in turn, then joins the resulting strings with a separator (a dot <code>.</code> by default). This can be useful for displaying ordinal values of characters in arbitrary strings:</p>

<pre><code>  printf &quot;%vd&quot;, &quot;AB\x{100}&quot;;           # prints &quot;65.66.256&quot;
  printf &quot;version is v%vd\n&quot;, $^V;     # Perl&#39;s version</code></pre>

<p>Put an asterisk <code>*</code> before the <code>v</code> to override the string to use to separate the numbers:</p>

<pre><code>  printf &quot;address is %*vX\n&quot;, &quot;:&quot;, $addr;   # IPv6 address
  printf &quot;bits are %0*v8b\n&quot;, &quot; &quot;, $bits;   # random bitstring</code></pre>

<p>You can also explicitly specify the argument number to use for the join string using something like <code>*2$v</code>; for example:</p>

<pre><code>  printf &#39;%*4$vX %*4$vX %*4$vX&#39;,       # 3 IPv6 addresses
          @addr[1..3], &quot;:&quot;;</code></pre>

</dd>
<dt id="(minimum)-width"><a id="minimum--width"></a>(minimum) width</dt>
<dd>

<p>Arguments are usually formatted to be only as wide as required to display the given value. You can override the width by putting a number here, or get the width from the next argument (with <code>*</code>) or from a specified argument (e.g., with <code>*2$</code>):</p>

<pre><code> printf &quot;&lt;%s&gt;&quot;, &quot;a&quot;;       # prints &quot;&lt;a&gt;&quot;
 printf &quot;&lt;%6s&gt;&quot;, &quot;a&quot;;      # prints &quot;&lt;     a&gt;&quot;
 printf &quot;&lt;%*s&gt;&quot;, 6, &quot;a&quot;;   # prints &quot;&lt;     a&gt;&quot;
 printf &#39;&lt;%*2$s&gt;&#39;, &quot;a&quot;, 6; # prints &quot;&lt;     a&gt;&quot;
 printf &quot;&lt;%2s&gt;&quot;, &quot;long&quot;;   # prints &quot;&lt;long&gt;&quot; (does not truncate)</code></pre>

<p>If a field width obtained through <code>*</code> is negative, it has the same effect as the <code>-</code> flag: left-justification.</p>

</dd>
<dt id="precision,-or-maximum-width"><a id="precision"></a><a id="precision--or-maximum-width"></a>precision, or maximum width </dt>
<dd>

<p>You can specify a precision (for numeric conversions) or a maximum width (for string conversions) by specifying a <code>.</code> followed by a number. For floating-point formats except <code>g</code> and <code>G</code>, this specifies how many places right of the decimal point to show (the default being 6). For example:</p>

<pre><code>  # these examples are subject to system-specific variation
  printf &#39;&lt;%f&gt;&#39;, 1;    # prints &quot;&lt;1.000000&gt;&quot;
  printf &#39;&lt;%.1f&gt;&#39;, 1;  # prints &quot;&lt;1.0&gt;&quot;
  printf &#39;&lt;%.0f&gt;&#39;, 1;  # prints &quot;&lt;1&gt;&quot;
  printf &#39;&lt;%e&gt;&#39;, 10;   # prints &quot;&lt;1.000000e+01&gt;&quot;
  printf &#39;&lt;%.1e&gt;&#39;, 10; # prints &quot;&lt;1.0e+01&gt;&quot;</code></pre>

<p>For &quot;g&quot; and &quot;G&quot;, this specifies the maximum number of significant digits to show; for example:</p>

<pre><code>  # These examples are subject to system-specific variation.
  printf &#39;&lt;%g&gt;&#39;, 1;        # prints &quot;&lt;1&gt;&quot;
  printf &#39;&lt;%.10g&gt;&#39;, 1;     # prints &quot;&lt;1&gt;&quot;
  printf &#39;&lt;%g&gt;&#39;, 100;      # prints &quot;&lt;100&gt;&quot;
  printf &#39;&lt;%.1g&gt;&#39;, 100;    # prints &quot;&lt;1e+02&gt;&quot;
  printf &#39;&lt;%.2g&gt;&#39;, 100.01; # prints &quot;&lt;1e+02&gt;&quot;
  printf &#39;&lt;%.5g&gt;&#39;, 100.01; # prints &quot;&lt;100.01&gt;&quot;
  printf &#39;&lt;%.4g&gt;&#39;, 100.01; # prints &quot;&lt;100&gt;&quot;
  printf &#39;&lt;%.1g&gt;&#39;, 0.0111; # prints &quot;&lt;0.01&gt;&quot;
  printf &#39;&lt;%.2g&gt;&#39;, 0.0111; # prints &quot;&lt;0.011&gt;&quot;
  printf &#39;&lt;%.3g&gt;&#39;, 0.0111; # prints &quot;&lt;0.0111&gt;&quot;</code></pre>

<p>For integer conversions, specifying a precision implies that the output of the number itself should be zero-padded to this width, where the 0 flag is ignored:</p>

<pre><code>  printf &#39;&lt;%.6d&gt;&#39;, 1;      # prints &quot;&lt;000001&gt;&quot;
  printf &#39;&lt;%+.6d&gt;&#39;, 1;     # prints &quot;&lt;+000001&gt;&quot;
  printf &#39;&lt;%-10.6d&gt;&#39;, 1;   # prints &quot;&lt;000001    &gt;&quot;
  printf &#39;&lt;%10.6d&gt;&#39;, 1;    # prints &quot;&lt;    000001&gt;&quot;
  printf &#39;&lt;%010.6d&gt;&#39;, 1;   # prints &quot;&lt;    000001&gt;&quot;
  printf &#39;&lt;%+10.6d&gt;&#39;, 1;   # prints &quot;&lt;   +000001&gt;&quot;

  printf &#39;&lt;%.6x&gt;&#39;, 1;      # prints &quot;&lt;000001&gt;&quot;
  printf &#39;&lt;%#.6x&gt;&#39;, 1;     # prints &quot;&lt;0x000001&gt;&quot;
  printf &#39;&lt;%-10.6x&gt;&#39;, 1;   # prints &quot;&lt;000001    &gt;&quot;
  printf &#39;&lt;%10.6x&gt;&#39;, 1;    # prints &quot;&lt;    000001&gt;&quot;
  printf &#39;&lt;%010.6x&gt;&#39;, 1;   # prints &quot;&lt;    000001&gt;&quot;
  printf &#39;&lt;%#10.6x&gt;&#39;, 1;   # prints &quot;&lt;  0x000001&gt;&quot;</code></pre>

<p>For string conversions, specifying a precision truncates the string to fit the specified width:</p>

<pre><code>  printf &#39;&lt;%.5s&gt;&#39;, &quot;truncated&quot;;   # prints &quot;&lt;trunc&gt;&quot;
  printf &#39;&lt;%10.5s&gt;&#39;, &quot;truncated&quot;; # prints &quot;&lt;     trunc&gt;&quot;</code></pre>

<p>You can also get the precision from the next argument using <code>.*</code>, or from a specified argument (e.g., with <code>.*2$</code>):</p>

<pre><code>  printf &#39;&lt;%.6x&gt;&#39;, 1;       # prints &quot;&lt;000001&gt;&quot;
  printf &#39;&lt;%.*x&gt;&#39;, 6, 1;    # prints &quot;&lt;000001&gt;&quot;

  printf &#39;&lt;%.*2$x&gt;&#39;, 1, 6;  # prints &quot;&lt;000001&gt;&quot;

  printf &#39;&lt;%6.*2$x&gt;&#39;, 1, 4; # prints &quot;&lt;  0001&gt;&quot;</code></pre>

<p>If a precision obtained through <code>*</code> is negative, it counts as having no precision at all.</p>

<pre><code>  printf &#39;&lt;%.*s&gt;&#39;,  7, &quot;string&quot;;   # prints &quot;&lt;string&gt;&quot;
  printf &#39;&lt;%.*s&gt;&#39;,  3, &quot;string&quot;;   # prints &quot;&lt;str&gt;&quot;
  printf &#39;&lt;%.*s&gt;&#39;,  0, &quot;string&quot;;   # prints &quot;&lt;&gt;&quot;
  printf &#39;&lt;%.*s&gt;&#39;, -1, &quot;string&quot;;   # prints &quot;&lt;string&gt;&quot;

  printf &#39;&lt;%.*d&gt;&#39;,  1, 0;   # prints &quot;&lt;0&gt;&quot;
  printf &#39;&lt;%.*d&gt;&#39;,  0, 0;   # prints &quot;&lt;&gt;&quot;
  printf &#39;&lt;%.*d&gt;&#39;, -1, 0;   # prints &quot;&lt;0&gt;&quot;</code></pre>

</dd>
<dt id="size">size</dt>
<dd>

<p>For numeric conversions, you can specify the size to interpret the number as using <code>l</code>, <code>h</code>, <code>V</code>, <code>q</code>, <code>L</code>, or <code>ll</code>. For integer conversions (<code>d u o x X b i D U O</code>), numbers are usually assumed to be whatever the default integer size is on your platform (usually 32 or 64 bits), but you can override this to use instead one of the standard C types, as supported by the compiler used to build Perl:</p>

<pre><code>   hh          interpret integer as C type &quot;char&quot; or &quot;unsigned
               char&quot; on Perl 5.14 or later
   h           interpret integer as C type &quot;short&quot; or
               &quot;unsigned short&quot;
   j           interpret integer as C type &quot;intmax_t&quot; on Perl
               5.14 or later; and prior to Perl 5.30, only with
               a C99 compiler (unportable)
   l           interpret integer as C type &quot;long&quot; or
               &quot;unsigned long&quot;
   q, L, or ll interpret integer as C type &quot;long long&quot;,
               &quot;unsigned long long&quot;, or &quot;quad&quot; (typically
               64-bit integers)
   t           interpret integer as C type &quot;ptrdiff_t&quot; on Perl
               5.14 or later
   z           interpret integer as C types &quot;size_t&quot; or
               &quot;ssize_t&quot; on Perl 5.14 or later</code></pre>

<p>Note that, in general, using the <code>l</code> modifier (for example, when writing <code>&quot;%ld&quot;</code> or <code>&quot;%lu&quot;</code> instead of <code>&quot;%d&quot;</code> and <code>&quot;%u&quot;</code>) is unnecessary when used from Perl code. Moreover, it may be harmful, for example on Windows 64-bit where a long is 32-bits.</p>

<p>As of 5.14, none of these raises an exception if they are not supported on your platform. However, if warnings are enabled, a warning of the <a href="https://metacpan.org/pod/warnings"><code>printf</code></a> warning class is issued on an unsupported conversion flag. Should you instead prefer an exception, do this:</p>

<pre><code>    use warnings FATAL =&gt; &quot;printf&quot;;</code></pre>

<p>If you would like to know about a version dependency before you start running the program, put something like this at its top:</p>

<pre><code>    use v5.14;  # for hh/j/t/z/ printf modifiers</code></pre>

<p>You can find out whether your Perl supports quads via <a href="https://metacpan.org/pod/Config">Config</a>:</p>

<pre><code>    use Config;
    if ($Config{use64bitint} eq &quot;define&quot;
        || $Config{longsize} &gt;= 8) {
        print &quot;Nice quads!\n&quot;;
    }</code></pre>

<p>For floating-point conversions (<code>e f g E F G</code>), numbers are usually assumed to be the default floating-point size on your platform (double or long double), but you can force &quot;long double&quot; with <code>q</code>, <code>L</code>, or <code>ll</code> if your platform supports them. You can find out whether your Perl supports long doubles via <a href="https://metacpan.org/pod/Config">Config</a>:</p>

<pre><code>    use Config;
    print &quot;long doubles\n&quot; if $Config{d_longdbl} eq &quot;define&quot;;</code></pre>

<p>You can find out whether Perl considers &quot;long double&quot; to be the default floating-point size to use on your platform via <a href="https://metacpan.org/pod/Config">Config</a>:</p>

<pre><code>    use Config;
    if ($Config{uselongdouble} eq &quot;define&quot;) {
        print &quot;long doubles by default\n&quot;;
    }</code></pre>

<p>It can also be that long doubles and doubles are the same thing:</p>

<pre><code>        use Config;
        ($Config{doublesize} == $Config{longdblsize}) &amp;&amp;
                print &quot;doubles are long doubles\n&quot;;</code></pre>

<p>The size specifier <code>V</code> has no effect for Perl code, but is supported for compatibility with XS code. It means &quot;use the standard size for a Perl integer or floating-point number&quot;, which is the default.</p>

</dd>
<dt id="order-of-arguments"><a id="order"></a>order of arguments</dt>
<dd>

<p>Normally, <a href="CORE.html#sprintf-FORMAT,-LIST"><code>sprintf</code></a> takes the next unused argument as the value to format for each format specification. If the format specification uses <code>*</code> to require additional arguments, these are consumed from the argument list in the order they appear in the format specification <i>before</i> the value to format. Where an argument is specified by an explicit index, this does not affect the normal order for the arguments, even when the explicitly specified index would have been the next argument.</p>

<p>So:</p>

<pre><code>    printf &quot;&lt;%*.*s&gt;&quot;, $a, $b, $c;</code></pre>

<p>uses <code>$a</code> for the width, <code>$b</code> for the precision, and <code>$c</code> as the value to format; while:</p>

<pre><code>  printf &#39;&lt;%*1$.*s&gt;&#39;, $a, $b;</code></pre>

<p>would use <code>$a</code> for the width and precision, and <code>$b</code> as the value to format.</p>

<p>Here are some more examples; be aware that when using an explicit index, the <code>$</code> may need escaping:</p>

<pre><code> printf &quot;%2\$d %d\n&quot;,      12, 34;     # will print &quot;34 12\n&quot;
 printf &quot;%2\$d %d %d\n&quot;,   12, 34;     # will print &quot;34 12 34\n&quot;
 printf &quot;%3\$d %d %d\n&quot;,   12, 34, 56; # will print &quot;56 12 34\n&quot;
 printf &quot;%2\$*3\$d %d\n&quot;,  12, 34,  3; # will print &quot; 34 12\n&quot;
 printf &quot;%*1\$.*f\n&quot;,       4,  5, 10; # will print &quot;5.0000\n&quot;</code></pre>

</dd>
</dl>

<p>If <a href="https://metacpan.org/pod/locale"><code>use locale</code></a> (including <code>use locale &#39;:not_characters&#39;</code>) is in effect and <a href="https://metacpan.org/pod/distribution/perl/ext/POSIX/lib/POSIX.pod#setlocale"><code>POSIX::setlocale</code></a> has been called, the character used for the decimal separator in formatted floating-point numbers is affected by the <code>LC_NUMERIC</code> locale. See <a href="https://metacpan.org/pod/distribution/perl/pod/perllocale.pod">perllocale</a> and <a href="https://metacpan.org/pod/distribution/perl/ext/POSIX/lib/POSIX.pod">POSIX</a>.</p>

</dd>
<dt id="sqrt-EXPR"><a id="sqrt"></a>sqrt EXPR   </dt>
<dd>

</dd>
<dt id="sqrt1">sqrt</dt>
<dd>

<p>Return the positive square root of EXPR. If EXPR is omitted, uses <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a>. Works only for non-negative operands unless you&#39;ve loaded the <a href="https://metacpan.org/pod/Math::Complex"><code>Math::Complex</code></a> module.</p>

<pre><code>    use Math::Complex;
    print sqrt(-4);    # prints 2i</code></pre>

</dd>
<dt id="srand-EXPR"><a id="srand"></a>srand EXPR   </dt>
<dd>

</dd>
<dt id="srand1">srand</dt>
<dd>

<p>Sets and returns the random number seed for the <a href="CORE.html#rand-EXPR"><code>rand</code></a> operator.</p>

<p>The point of the function is to &quot;seed&quot; the <a href="CORE.html#rand-EXPR"><code>rand</code></a> function so that <a href="CORE.html#rand-EXPR"><code>rand</code></a> can produce a different sequence each time you run your program. When called with a parameter, <a href="CORE.html#srand-EXPR"><code>srand</code></a> uses that for the seed; otherwise it (semi-)randomly chooses a seed (see below). In either case, starting with Perl 5.14, it returns the seed. To signal that your code will work <i>only</i> on Perls of a recent vintage:</p>

<pre><code>    use v5.14;  # so srand returns the seed</code></pre>

<p>If <a href="CORE.html#srand-EXPR"><code>srand</code></a> is not called explicitly, it is called implicitly without a parameter at the first use of the <a href="CORE.html#rand-EXPR"><code>rand</code></a> operator. However, there are a few situations where programs are likely to want to call <a href="CORE.html#srand-EXPR"><code>srand</code></a>. One is for generating predictable results, generally for testing or debugging. There, you use <code>srand($seed)</code>, with the same <code>$seed</code> each time. Another case is that you may want to call <a href="CORE.html#srand-EXPR"><code>srand</code></a> after a <a href="CORE.html#fork"><code>fork</code></a> to avoid child processes sharing the same seed value as the parent (and consequently each other).</p>

<p>Do <b>not</b> call <code>srand()</code> (i.e., without an argument) more than once per process. The internal state of the random number generator should contain more entropy than can be provided by any seed, so calling <a href="CORE.html#srand-EXPR"><code>srand</code></a> again actually <i>loses</i> randomness.</p>

<p>Most implementations of <a href="CORE.html#srand-EXPR"><code>srand</code></a> take an integer and will silently truncate decimal numbers. This means <code>srand(42)</code> will usually produce the same results as <code>srand(42.1)</code>. To be safe, always pass <a href="CORE.html#srand-EXPR"><code>srand</code></a> an integer.</p>

<p>A typical use of the returned seed is for a test program which has too many combinations to test comprehensively in the time available to it each run. It can test a random subset each time, and should there be a failure, log the seed used for that run so that it can later be used to reproduce the same results.</p>

<p>If the <code>PERL_RAND_SEED</code> environment variable is set to a non-negative integer during process startup then calls to <code>srand()</code> with no arguments will initialize the perl random number generator with a consistent seed each time it is called, whether called explicitly with no arguments or implicitly via use of <code>rand()</code>. The exact seeding that a given <code>PERL_RAND_SEED</code> will produce is deliberately unspecified, but using different values for <code>PERL_RAND_SEED</code> should produce different results. This is intended for debugging and performance analysis and is only guaranteed to produce consistent results between invocations of the same perl executable running the same code when all other factors are equal. The environment variable is read only once during process startup, and changing it during the program flow will not affect the currently running process. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlrun.pod">perlrun</a> for more details.</p>

<p><b><a href="CORE.html#rand-EXPR"><code>rand</code></a> is not cryptographically secure. You should not rely on it in security-sensitive situations.</b> As of this writing, a number of third-party CPAN modules offer random number generators intended by their authors to be cryptographically secure, including: <a href="../Data::Entropy.html">Data::Entropy</a>, <a href="../Crypt::Random.html">Crypt::Random</a>, <a href="../Math::Random::Secure.html">Math::Random::Secure</a>, and <a href="../Math::TrulyRandom.html">Math::TrulyRandom</a>.</p>

</dd>
<dt id="stat-FILEHANDLE"><a id="stat"></a>stat FILEHANDLE   </dt>
<dd>

</dd>
<dt id="stat-EXPR"><a id="stat1"></a>stat EXPR</dt>
<dd>

</dd>
<dt id="stat-DIRHANDLE"><a id="stat2"></a>stat DIRHANDLE</dt>
<dd>

</dd>
<dt id="stat3">stat</dt>
<dd>

<p>Returns a 13-element list giving the status info for a file, either the file opened via FILEHANDLE or DIRHANDLE, or named by EXPR. If EXPR is omitted, it stats <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a> (not <code>_</code>!). Returns the empty list if <a href="CORE.html#stat-FILEHANDLE"><code>stat</code></a> fails. Typically used as follows:</p>

<pre><code>    my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
        $atime,$mtime,$ctime,$blksize,$blocks)
           = stat($filename);</code></pre>

<p>Not all fields are supported on all filesystem types. Here are the meanings of the fields:</p>

<pre><code>  0 dev      device number of filesystem
  1 ino      inode number
  2 mode     file mode  (type and permissions)
  3 nlink    number of (hard) links to the file
  4 uid      numeric user ID of file&#39;s owner
  5 gid      numeric group ID of file&#39;s owner
  6 rdev     the device identifier (special files only)
  7 size     total size of file, in bytes
  8 atime    last access time in seconds since the epoch
  9 mtime    last modify time in seconds since the epoch
 10 ctime    inode change time in seconds since the epoch (*)
 11 blksize  preferred I/O size in bytes for interacting with the
             file (may vary from file to file)
 12 blocks   actual number of system-specific blocks allocated
             on disk (often, but not always, 512 bytes each)</code></pre>

<p>(The epoch was at 00:00 January 1, 1970 GMT.)</p>

<p>(*) Not all fields are supported on all filesystem types. Notably, the ctime field is non-portable. In particular, you cannot expect it to be a &quot;creation time&quot;; see <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#Files-and-Filesystems">&quot;Files and Filesystems&quot; in perlport</a> for details.</p>

<p>If <a href="CORE.html#stat-FILEHANDLE"><code>stat</code></a> is passed the special filehandle consisting of an underline, no stat is done, but the current contents of the stat structure from the last <a href="CORE.html#stat-FILEHANDLE"><code>stat</code></a>, <a href="CORE.html#lstat-FILEHANDLE"><code>lstat</code></a>, or filetest are returned. Example:</p>

<pre><code>    if (-x $file &amp;&amp; (($d) = stat(_)) &amp;&amp; $d &lt; 0) {
        print &quot;$file is executable NFS file\n&quot;;
    }</code></pre>

<p>(This works on machines only for which the device number is negative under NFS.)</p>

<p>On some platforms inode numbers are of a type larger than perl knows how to handle as integer numerical values. If necessary, an inode number will be returned as a decimal string in order to preserve the entire value. If used in a numeric context, this will be converted to a floating-point numerical value, with rounding, a fate that is best avoided. Therefore, you should prefer to compare inode numbers using <code>eq</code> rather than <code>==</code>. <code>eq</code> will work fine on inode numbers that are represented numerically, as well as those represented as strings.</p>

<p>Because the mode contains both the file type and its permissions, you should mask off the file type portion and (s)printf using a <code>&quot;%o&quot;</code> if you want to see the real permissions.</p>

<pre><code>    my $mode = (stat($filename))[2];
    printf &quot;Permissions are %04o\n&quot;, $mode &amp; 07777;</code></pre>

<p>In scalar context, <a href="CORE.html#stat-FILEHANDLE"><code>stat</code></a> returns a boolean value indicating success or failure, and, if successful, sets the information associated with the special filehandle <code>_</code>.</p>

<p>The <a href="https://metacpan.org/pod/File::stat">File::stat</a> module provides a convenient, by-name access mechanism:</p>

<pre><code>    use File::stat;
    my $sb = stat($filename);
    printf &quot;File is %s, size is %s, perm %04o, mtime %s\n&quot;,
           $filename, $sb-&gt;size, $sb-&gt;mode &amp; 07777,
           scalar localtime $sb-&gt;mtime;</code></pre>

<p>You can import symbolic mode constants (<code>S_IF*</code>) and functions (<code>S_IS*</code>) from the <a href="https://metacpan.org/pod/Fcntl">Fcntl</a> module:</p>

<pre><code>    use Fcntl &#39;:mode&#39;;

    my $mode = (stat($filename))[2];

    my $user_rwx      = ($mode &amp; S_IRWXU) &gt;&gt; 6;
    my $group_read    = ($mode &amp; S_IRGRP) &gt;&gt; 3;
    my $other_execute =  $mode &amp; S_IXOTH;

    printf &quot;Permissions are %04o\n&quot;, S_IMODE($mode), &quot;\n&quot;;

    my $is_setuid     =  $mode &amp; S_ISUID;
    my $is_directory  =  S_ISDIR($mode);</code></pre>

<p>You could write the last two using the <code>-u</code> and <code>-d</code> operators. Commonly available <code>S_IF*</code> constants are:</p>

<pre><code>    # Permissions: read, write, execute, for user, group, others.

    S_IRWXU S_IRUSR S_IWUSR S_IXUSR
    S_IRWXG S_IRGRP S_IWGRP S_IXGRP
    S_IRWXO S_IROTH S_IWOTH S_IXOTH

    # Setuid/Setgid/Stickiness/SaveText.
    # Note that the exact meaning of these is system-dependent.

    S_ISUID S_ISGID S_ISVTX S_ISTXT

    # File types.  Not all are necessarily available on
    # your system.

    S_IFREG S_IFDIR S_IFLNK S_IFBLK S_IFCHR
    S_IFIFO S_IFSOCK S_IFWHT S_ENFMT

    # The following are compatibility aliases for S_IRUSR,
    # S_IWUSR, and S_IXUSR.

    S_IREAD S_IWRITE S_IEXEC</code></pre>

<p>and the <code>S_IF*</code> functions are</p>

<pre><code>    S_IMODE($mode)    the part of $mode containing the permission
                      bits and the setuid/setgid/sticky bits

    S_IFMT($mode)     the part of $mode containing the file type
                      which can be bit-anded with (for example)
                      S_IFREG or with the following functions

    # The operators -f, -d, -l, -b, -c, -p, and -S.

    S_ISREG($mode) S_ISDIR($mode) S_ISLNK($mode)
    S_ISBLK($mode) S_ISCHR($mode) S_ISFIFO($mode) S_ISSOCK($mode)

    # No direct -X operator counterpart, but for the first one
    # the -g operator is often equivalent.  The ENFMT stands for
    # record flocking enforcement, a platform-dependent feature.

    S_ISENFMT($mode) S_ISWHT($mode)</code></pre>

<p>See your native <a href="http://man.he.net/man2/chmod">chmod(2)</a> and <a href="http://man.he.net/man2/stat">stat(2)</a> documentation for more details about the <code>S_*</code> constants. To get status info for a symbolic link instead of the target file behind the link, use the <a href="CORE.html#lstat-FILEHANDLE"><code>lstat</code></a> function.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#stat">&quot;stat&quot; in perlport</a>.</p>

</dd>
<dt id="state-VARLIST"><a id="state"></a>state VARLIST </dt>
<dd>

</dd>
<dt id="state-TYPE-VARLIST"><a id="state1"></a>state TYPE VARLIST</dt>
<dd>

</dd>
<dt id="state-VARLIST-:-ATTRS"><a id="state2"></a>state VARLIST : ATTRS</dt>
<dd>

</dd>
<dt id="state-TYPE-VARLIST-:-ATTRS"><a id="state3"></a>state TYPE VARLIST : ATTRS</dt>
<dd>

<p><a href="CORE.html#state-VARLIST"><code>state</code></a> declares a lexically scoped variable, just like <a href="CORE.html#my-VARLIST"><code>my</code></a>. However, those variables will never be reinitialized, contrary to lexical variables that are reinitialized each time their enclosing block is entered. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlsub.pod#Persistent-Private-Variables">&quot;Persistent Private Variables&quot; in perlsub</a> for details.</p>

<p>If more than one variable is listed, the list must be placed in parentheses. With a parenthesised list, <a href="CORE.html#undef-EXPR"><code>undef</code></a> can be used as a dummy placeholder. However, since initialization of state variables in such lists is currently not possible this would serve no purpose.</p>

<p>Redeclaring a variable in the same scope or statement will &quot;shadow&quot; the previous declaration, creating a new instance and preventing access to the previous one. This is usually undesired and, if warnings are enabled, will result in a warning in the <code>shadow</code> category.</p>

<p><a href="CORE.html#state-VARLIST"><code>state</code></a> is available only if the <a href="https://metacpan.org/pod/feature#The-&#39;state&#39;-feature"><code>&quot;state&quot;</code> feature</a> is enabled or if it is prefixed with <code>CORE::</code>. The <a href="https://metacpan.org/pod/feature#The-&#39;state&#39;-feature"><code>&quot;state&quot;</code> feature</a> is enabled automatically with a <code>use v5.10</code> (or higher) declaration in the current scope.</p>

</dd>
<dt id="study-SCALAR"><a id="study"></a>study SCALAR </dt>
<dd>

</dd>
<dt id="study1">study</dt>
<dd>

<p>At this time, <code>study</code> does nothing. This may change in the future.</p>

<p>Prior to Perl version 5.16, it would create an inverted index of all characters that occurred in the given SCALAR (or <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a> if unspecified). When matching a pattern, the rarest character from the pattern would be looked up in this index. Rarity was based on some static frequency tables constructed from some C programs and English text.</p>

</dd>
<dt id="sub-NAME-BLOCK"><a id="sub"></a>sub NAME BLOCK </dt>
<dd>

</dd>
<dt id="sub-NAME-(PROTO)-BLOCK"><a id="sub1"></a><a id="sub-NAME--PROTO--BLOCK"></a>sub NAME (PROTO) BLOCK</dt>
<dd>

</dd>
<dt id="sub-NAME-:-ATTRS-BLOCK"><a id="sub2"></a>sub NAME : ATTRS BLOCK</dt>
<dd>

</dd>
<dt id="sub-NAME-(PROTO)-:-ATTRS-BLOCK"><a id="sub3"></a><a id="sub-NAME--PROTO--:-ATTRS-BLOCK"></a>sub NAME (PROTO) : ATTRS BLOCK</dt>
<dd>

<p>This is subroutine definition, not a real function <i>per se</i>. Without a BLOCK it&#39;s just a forward declaration. Without a NAME, it&#39;s an anonymous function declaration, so does return a value: the CODE ref of the closure just created.</p>

<p>See <a href="https://metacpan.org/pod/distribution/perl/pod/perlsub.pod">perlsub</a> and <a href="https://metacpan.org/pod/distribution/perl/pod/perlref.pod">perlref</a> for details about subroutines and references; see <a href="https://metacpan.org/pod/attributes">attributes</a> and <a href="https://metacpan.org/pod/Attribute::Handlers">Attribute::Handlers</a> for more information about attributes.</p>

</dd>
<dt id="__SUB__"><a id="SUB__"></a>__SUB__ </dt>
<dd>

<p>A special token that returns a reference to the current subroutine, or <a href="CORE.html#undef-EXPR"><code>undef</code></a> outside of a subroutine.</p>

<p>The behaviour of <a href="CORE.html#__SUB__"><code>__SUB__</code></a> within a regex code block (such as <code>/(?{...})/</code>) is subject to change.</p>

<p>This token is only available under <code>use v5.16</code> or the <a href="https://metacpan.org/pod/feature#The-&#39;current_sub&#39;-feature"><code>&quot;current_sub&quot;</code> feature</a>. See <a href="https://metacpan.org/pod/feature">feature</a>.</p>

</dd>
<dt id="substr-EXPR,OFFSET,LENGTH,REPLACEMENT"><a id="substr"></a><a id="substr-EXPR-OFFSET-LENGTH-REPLACEMENT"></a>substr EXPR,OFFSET,LENGTH,REPLACEMENT     </dt>
<dd>

</dd>
<dt id="substr-EXPR,OFFSET,LENGTH"><a id="substr1"></a><a id="substr-EXPR-OFFSET-LENGTH"></a>substr EXPR,OFFSET,LENGTH</dt>
<dd>

</dd>
<dt id="substr-EXPR,OFFSET"><a id="substr2"></a><a id="substr-EXPR-OFFSET"></a>substr EXPR,OFFSET</dt>
<dd>

<p>Extracts a substring out of EXPR and returns it. First character is at offset zero. If OFFSET is negative, starts that far back from the end of the string. If LENGTH is omitted, returns everything through the end of the string. If LENGTH is negative, leaves that many characters off the end of the string.</p>

<pre><code>    my $s = &quot;The black cat climbed the green tree&quot;;
    my $color  = substr $s, 4, 5;      # black
    my $middle = substr $s, 4, -11;    # black cat climbed the
    my $end    = substr $s, 14;        # climbed the green tree
    my $tail   = substr $s, -4;        # tree
    my $z      = substr $s, -4, 2;     # tr</code></pre>

<p>You can use the <a href="CORE.html#substr-EXPR,OFFSET,LENGTH,REPLACEMENT"><code>substr</code></a> function as an lvalue, in which case EXPR must itself be an lvalue. If you assign something shorter than LENGTH, the string will shrink, and if you assign something longer than LENGTH, the string will grow to accommodate it. To keep the string the same length, you may need to pad or chop your value using <a href="CORE.html#sprintf-FORMAT,-LIST"><code>sprintf</code></a>.</p>

<p>If OFFSET and LENGTH specify a substring that is partly outside the string, only the part within the string is returned. If the substring is beyond either end of the string, <a href="CORE.html#substr-EXPR,OFFSET,LENGTH,REPLACEMENT"><code>substr</code></a> returns the undefined value and produces a warning. When used as an lvalue, specifying a substring that is entirely outside the string raises an exception. Here&#39;s an example showing the behavior for boundary cases:</p>

<pre><code>    my $name = &#39;fred&#39;;
    substr($name, 4) = &#39;dy&#39;;         # $name is now &#39;freddy&#39;
    my $null = substr $name, 6, 2;   # returns &quot;&quot; (no warning)
    my $oops = substr $name, 7;      # returns undef, with warning
    substr($name, 7) = &#39;gap&#39;;        # raises an exception</code></pre>

<p>An alternative to using <a href="CORE.html#substr-EXPR,OFFSET,LENGTH,REPLACEMENT"><code>substr</code></a> as an lvalue is to specify the REPLACEMENT string as the 4th argument. This allows you to replace parts of the EXPR and return what was there before in one operation, just as you can with <a href="CORE.html#splice-ARRAY,OFFSET,LENGTH,LIST"><code>splice</code></a>.</p>

<pre><code>    my $s = &quot;The black cat climbed the green tree&quot;;
    my $z = substr $s, 14, 7, &quot;jumped from&quot;;    # climbed
    # $s is now &quot;The black cat jumped from the green tree&quot;</code></pre>

<p>Note that the lvalue returned by the three-argument version of <a href="CORE.html#substr-EXPR,OFFSET,LENGTH,REPLACEMENT"><code>substr</code></a> acts as a &#39;magic bullet&#39;; each time it is assigned to, it remembers which part of the original string is being modified; for example:</p>

<pre><code>    my $x = &#39;1234&#39;;
    for (substr($x,1,2)) {
        $_ = &#39;a&#39;;   print $x,&quot;\n&quot;;    # prints 1a4
        $_ = &#39;xyz&#39;; print $x,&quot;\n&quot;;    # prints 1xyz4
        $x = &#39;56789&#39;;
        $_ = &#39;pq&#39;;  print $x,&quot;\n&quot;;    # prints 5pq9
    }</code></pre>

<p>With negative offsets, it remembers its position from the end of the string when the target string is modified:</p>

<pre><code>    my $x = &#39;1234&#39;;
    for (substr($x, -3, 2)) {
        $_ = &#39;a&#39;;   print $x,&quot;\n&quot;;    # prints 1a4, as above
        $x = &#39;abcdefg&#39;;
        print $_,&quot;\n&quot;;                # prints f
    }</code></pre>

<p>Prior to Perl version 5.10, the result of using an lvalue multiple times was unspecified. Prior to 5.16, the result with negative offsets was unspecified.</p>

</dd>
<dt id="symlink-OLDFILE,NEWFILE"><a id="symlink"></a><a id="symlink-OLDFILE-NEWFILE"></a>symlink OLDFILE,NEWFILE    </dt>
<dd>

<p>Creates a new filename symbolically linked to the old filename. Returns <code>1</code> for success, <code>0</code> otherwise. On systems that don&#39;t support symbolic links, raises an exception. To check for that, use eval:</p>

<pre><code>    my $symlink_exists = eval { symlink(&quot;&quot;,&quot;&quot;); 1 };</code></pre>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#symlink">&quot;symlink&quot; in perlport</a>.</p>

</dd>
<dt id="syscall-NUMBER,-LIST"><a id="syscall"></a><a id="syscall-NUMBER--LIST"></a>syscall NUMBER, LIST  </dt>
<dd>

<p>Calls the system call specified as the first element of the list, passing the remaining elements as arguments to the system call. If unimplemented, raises an exception. The arguments are interpreted as follows: if a given argument is numeric, the argument is passed as an int. If not, the pointer to the string value is passed. You are responsible to make sure a string is pre-extended long enough to receive any result that might be written into a string. You can&#39;t use a string literal (or other read-only string) as an argument to <a href="CORE.html#syscall-NUMBER,-LIST"><code>syscall</code></a> because Perl has to assume that any string pointer might be written through. If your integer arguments are not literals and have never been interpreted in a numeric context, you may need to add <code>0</code> to them to force them to look like numbers. This emulates the <a href="CORE.html#syswrite-FILEHANDLE,SCALAR,LENGTH,OFFSET"><code>syswrite</code></a> function (or vice versa):</p>

<pre><code>    require &#39;syscall.ph&#39;;        # may need to run h2ph
    my $s = &quot;hi there\n&quot;;
    syscall(SYS_write(), fileno(STDOUT), $s, length $s);</code></pre>

<p>Note that Perl supports passing of up to only 14 arguments to your syscall, which in practice should (usually) suffice.</p>

<p>Syscall returns whatever value returned by the system call it calls. If the system call fails, <a href="CORE.html#syscall-NUMBER,-LIST"><code>syscall</code></a> returns <code>-1</code> and sets <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$!"><code>$!</code></a> (errno). Note that some system calls <i>can</i> legitimately return <code>-1</code>. The proper way to handle such calls is to assign <code>$! = 0</code> before the call, then check the value of <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$!"><code>$!</code></a> if <a href="CORE.html#syscall-NUMBER,-LIST"><code>syscall</code></a> returns <code>-1</code>.</p>

<p>There&#39;s a problem with <code>syscall(SYS_pipe())</code>: it returns the file number of the read end of the pipe it creates, but there is no way to retrieve the file number of the other end. You can avoid this problem by using <a href="CORE.html#pipe-READHANDLE,WRITEHANDLE"><code>pipe</code></a> instead.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#syscall">&quot;syscall&quot; in perlport</a>.</p>

</dd>
<dt id="sysopen-FILEHANDLE,FILENAME,MODE"><a id="sysopen"></a><a id="sysopen-FILEHANDLE-FILENAME-MODE"></a>sysopen FILEHANDLE,FILENAME,MODE </dt>
<dd>

</dd>
<dt id="sysopen-FILEHANDLE,FILENAME,MODE,PERMS"><a id="sysopen1"></a><a id="sysopen-FILEHANDLE-FILENAME-MODE-PERMS"></a>sysopen FILEHANDLE,FILENAME,MODE,PERMS</dt>
<dd>

<p>Opens the file whose filename is given by FILENAME, and associates it with FILEHANDLE. If FILEHANDLE is an expression, its value is used as the real filehandle wanted; an undefined scalar will be suitably autovivified. This function calls the underlying operating system&#39;s <a href="http://man.he.net/man2/open">open(2)</a> function with the parameters FILENAME, MODE, and PERMS.</p>

<p>Returns true on success and <a href="CORE.html#undef-EXPR"><code>undef</code></a> otherwise.</p>

<p><a href="https://metacpan.org/pod/PerlIO">PerlIO</a> layers will be applied to the handle the same way they would in an <a href="CORE.html#open-FILEHANDLE,MODE,EXPR"><code>open</code></a> call that does not specify layers. That is, the current value of <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$%7B%5EOPEN%7D"><code>${^OPEN}</code></a> as set by the <a href="https://metacpan.org/pod/open">open</a> pragma in a lexical scope, or the <code>-C</code> commandline option or <code>PERL_UNICODE</code> environment variable in the main program scope, falling back to the platform defaults as described in <a href="https://metacpan.org/pod/PerlIO#Defaults-and-how-to-override-them">&quot;Defaults and how to override them&quot; in PerlIO</a>. If you want to remove any layers that may transform the byte stream, use <a href="CORE.html#binmode-FILEHANDLE,-LAYER"><code>binmode</code></a> after opening it.</p>

<p>The possible values and flag bits of the MODE parameter are system-dependent; they are available via the standard module <a href="https://metacpan.org/pod/Fcntl"><code>Fcntl</code></a>. See the documentation of your operating system&#39;s <a href="http://man.he.net/man2/open">open(2)</a> syscall to see which values and flag bits are available. You may combine several flags using the <code>|</code>-operator.</p>

<p>Some of the most common values are <code>O_RDONLY</code> for opening the file in read-only mode, <code>O_WRONLY</code> for opening the file in write-only mode, and <code>O_RDWR</code> for opening the file in read-write mode.   </p>

<p>For historical reasons, some values work on almost every system supported by Perl: 0 means read-only, 1 means write-only, and 2 means read/write. We know that these values do <i>not</i> work under OS/390; you probably don&#39;t want to use them in new code.</p>

<p>If the file named by FILENAME does not exist and the <a href="CORE.html#open-FILEHANDLE,MODE,EXPR"><code>open</code></a> call creates it (typically because MODE includes the <code>O_CREAT</code> flag), then the value of PERMS specifies the permissions of the newly created file. If you omit the PERMS argument to <a href="CORE.html#sysopen-FILEHANDLE,FILENAME,MODE"><code>sysopen</code></a>, Perl uses the octal value <code>0666</code>. These permission values need to be in octal, and are modified by your process&#39;s current <a href="CORE.html#umask-EXPR"><code>umask</code></a>. </p>

<p>In many systems the <code>O_EXCL</code> flag is available for opening files in exclusive mode. This is <b>not</b> locking: exclusiveness means here that if the file already exists, <a href="CORE.html#sysopen-FILEHANDLE,FILENAME,MODE"><code>sysopen</code></a> fails. <code>O_EXCL</code> may not work on network filesystems, and has no effect unless the <code>O_CREAT</code> flag is set as well. Setting <code>O_CREAT|O_EXCL</code> prevents the file from being opened if it is a symbolic link. It does not protect against symbolic links in the file&#39;s path. </p>

<p>Sometimes you may want to truncate an already-existing file. This can be done using the <code>O_TRUNC</code> flag. The behavior of <code>O_TRUNC</code> with <code>O_RDONLY</code> is undefined. </p>

<p>You should seldom if ever use <code>0644</code> as argument to <a href="CORE.html#sysopen-FILEHANDLE,FILENAME,MODE"><code>sysopen</code></a>, because that takes away the user&#39;s option to have a more permissive umask. Better to omit it. See <a href="CORE.html#umask-EXPR"><code>umask</code></a> for more on this.</p>

<p>This function has no direct relation to the usage of <a href="CORE.html#sysread-FILEHANDLE,SCALAR,LENGTH,OFFSET"><code>sysread</code></a>, <a href="CORE.html#syswrite-FILEHANDLE,SCALAR,LENGTH,OFFSET"><code>syswrite</code></a>, or <a href="CORE.html#sysseek-FILEHANDLE,POSITION,WHENCE"><code>sysseek</code></a>. A handle opened with this function can be used with buffered IO just as one opened with <a href="CORE.html#open-FILEHANDLE,MODE,EXPR"><code>open</code></a> can be used with unbuffered IO.</p>

<p>Note that under Perls older than 5.8.0, <a href="CORE.html#sysopen-FILEHANDLE,FILENAME,MODE"><code>sysopen</code></a> depends on the <a href="http://man.he.net/man3/fdopen">fdopen(3)</a> C library function. On many Unix systems, <a href="http://man.he.net/man3/fdopen">fdopen(3)</a> is known to fail when file descriptors exceed a certain value, typically 255. If you need more file descriptors than that, consider using the <a href="https://metacpan.org/pod/distribution/perl/ext/POSIX/lib/POSIX.pod#open"><code>POSIX::open</code></a> function. For Perls 5.8.0 and later, PerlIO is (most often) the default.</p>

<p>See <a href="https://metacpan.org/pod/distribution/perl/pod/perlopentut.pod">perlopentut</a> for a kinder, gentler explanation of opening files.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#sysopen">&quot;sysopen&quot; in perlport</a>.</p>

</dd>
<dt id="sysread-FILEHANDLE,SCALAR,LENGTH,OFFSET"><a id="sysread"></a><a id="sysread-FILEHANDLE-SCALAR-LENGTH-OFFSET"></a>sysread FILEHANDLE,SCALAR,LENGTH,OFFSET </dt>
<dd>

</dd>
<dt id="sysread-FILEHANDLE,SCALAR,LENGTH"><a id="sysread1"></a><a id="sysread-FILEHANDLE-SCALAR-LENGTH"></a>sysread FILEHANDLE,SCALAR,LENGTH</dt>
<dd>

<p>Attempts to read LENGTH bytes of data into variable SCALAR from the specified FILEHANDLE, using <a href="http://man.he.net/man2/read">read(2)</a>. It bypasses any <a href="https://metacpan.org/pod/PerlIO">PerlIO</a> layers including buffered IO (but is affected by the presence of the <code>:utf8</code> layer as described later), so mixing this with other kinds of reads, <a href="CORE.html#print-FILEHANDLE-LIST"><code>print</code></a>, <a href="CORE.html#write-FILEHANDLE"><code>write</code></a>, <a href="CORE.html#seek-FILEHANDLE,POSITION,WHENCE"><code>seek</code></a>, <a href="CORE.html#tell-FILEHANDLE"><code>tell</code></a>, or <a href="CORE.html#eof-FILEHANDLE"><code>eof</code></a> can cause confusion because the <code>:perlio</code> or <code>:crlf</code> layers usually buffer data. Returns the number of bytes actually read, <code>0</code> at end of file, or undef if there was an error (in the latter case <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$!"><code>$!</code></a> is also set). SCALAR will be grown or shrunk so that the last byte actually read is the last byte of the scalar after the read.</p>

<p>An OFFSET may be specified to place the read data at some place in the string other than the beginning. A negative OFFSET specifies placement at that many characters counting backwards from the end of the string. A positive OFFSET greater than the length of SCALAR results in the string being padded to the required size with <code>&quot;\0&quot;</code> bytes before the result of the read is appended.</p>

<p>There is no syseof() function, which is ok, since <a href="CORE.html#eof-FILEHANDLE"><code>eof</code></a> doesn&#39;t work well on device files (like ttys) anyway. Use <a href="CORE.html#sysread-FILEHANDLE,SCALAR,LENGTH,OFFSET"><code>sysread</code></a> and check for a return value of 0 to decide whether you&#39;re done.</p>

<p>Note that if the filehandle has been marked as <code>:utf8</code>, <code>sysread</code> will throw an exception. The <code>:encoding(...)</code> layer implicitly introduces the <code>:utf8</code> layer. See <a href="CORE.html#binmode-FILEHANDLE,-LAYER"><code>binmode</code></a>, <a href="CORE.html#open-FILEHANDLE,MODE,EXPR"><code>open</code></a>, and the <a href="https://metacpan.org/pod/open">open</a> pragma.</p>

</dd>
<dt id="sysseek-FILEHANDLE,POSITION,WHENCE"><a id="sysseek"></a><a id="sysseek-FILEHANDLE-POSITION-WHENCE"></a>sysseek FILEHANDLE,POSITION,WHENCE  </dt>
<dd>

<p>Sets FILEHANDLE&#39;s system position <i>in bytes</i> using <a href="http://man.he.net/man2/lseek">lseek(2)</a>. FILEHANDLE may be an expression whose value gives the name of the filehandle. The values for WHENCE are <code>0</code> to set the new position to POSITION; <code>1</code> to set it to the current position plus POSITION; and <code>2</code> to set it to EOF plus POSITION, typically negative.</p>

<p>Note the emphasis on bytes: even if the filehandle has been set to operate on characters (for example using the <code>:encoding(UTF-8)</code> I/O layer), the <a href="CORE.html#seek-FILEHANDLE,POSITION,WHENCE"><code>seek</code></a>, <a href="CORE.html#tell-FILEHANDLE"><code>tell</code></a>, and <a href="CORE.html#sysseek-FILEHANDLE,POSITION,WHENCE"><code>sysseek</code></a> family of functions use byte offsets, not character offsets, because seeking to a character offset would be very slow in a UTF-8 file.</p>

<p><a href="CORE.html#sysseek-FILEHANDLE,POSITION,WHENCE"><code>sysseek</code></a> bypasses normal buffered IO, so mixing it with reads other than <a href="CORE.html#sysread-FILEHANDLE,SCALAR,LENGTH,OFFSET"><code>sysread</code></a> (for example <a href="CORE.html#readline-EXPR"><code>readline</code></a> or <a href="CORE.html#read-FILEHANDLE,SCALAR,LENGTH,OFFSET"><code>read</code></a>), <a href="CORE.html#print-FILEHANDLE-LIST"><code>print</code></a>, <a href="CORE.html#write-FILEHANDLE"><code>write</code></a>, <a href="CORE.html#seek-FILEHANDLE,POSITION,WHENCE"><code>seek</code></a>, <a href="CORE.html#tell-FILEHANDLE"><code>tell</code></a>, or <a href="CORE.html#eof-FILEHANDLE"><code>eof</code></a> may cause confusion.</p>

<p>For WHENCE, you may also use the constants <code>SEEK_SET</code>, <code>SEEK_CUR</code>, and <code>SEEK_END</code> (start of the file, current position, end of the file) from the <a href="https://metacpan.org/pod/Fcntl">Fcntl</a> module. Use of the constants is also more portable than relying on 0, 1, and 2. For example to define a &quot;systell&quot; function:</p>

<pre><code>    use Fcntl &#39;SEEK_CUR&#39;;
    sub systell { sysseek($_[0], 0, SEEK_CUR) }</code></pre>

<p>Returns the new position, or the undefined value on failure. A position of zero is returned as the string <code>&quot;0 but true&quot;</code>; thus <a href="CORE.html#sysseek-FILEHANDLE,POSITION,WHENCE"><code>sysseek</code></a> returns true on success and false on failure, yet you can still easily determine the new position.</p>

</dd>
<dt id="system-LIST"><a id="system"></a>system LIST  </dt>
<dd>

</dd>
<dt id="system-PROGRAM-LIST"><a id="system1"></a>system PROGRAM LIST</dt>
<dd>

<p>Does exactly the same thing as <a href="CORE.html#exec-LIST"><code>exec</code></a>, except that a fork is done first and the parent process waits for the child process to exit. Note that argument processing varies depending on the number of arguments. If there is more than one argument in LIST, or if LIST is an array with more than one value, starts the program given by the first element of the list with arguments given by the rest of the list. If there is only one scalar argument, the argument is checked for shell metacharacters, and if there are any, the entire argument is passed to the system&#39;s command shell for parsing (this is <code>/bin/sh -c</code> on Unix platforms, but varies on other platforms). If there are no shell metacharacters in the argument, it is split into words and passed directly to <code>execvp</code>, which is more efficient. On Windows, only the <code>system PROGRAM LIST</code> syntax will reliably avoid using the shell; <code>system LIST</code>, even with more than one element, will fall back to the shell if the first spawn fails.</p>

<p>Perl will attempt to flush all files opened for output before any operation that may do a fork, but this may not be supported on some platforms (see <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod">perlport</a>). To be safe, you may need to set <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$%7C"><code>$|</code></a> (<code>$AUTOFLUSH</code> in <a href="https://metacpan.org/pod/English">English</a>) or call the <code>autoflush</code> method of <a href="https://metacpan.org/pod/IO::Handle#METHODS"><code>IO::Handle</code></a> on any open handles.</p>

<p>The return value is the exit status of the program as returned by the <a href="CORE.html#wait"><code>wait</code></a> call. To get the actual exit value, shift right by eight (see below). See also <a href="CORE.html#exec-LIST"><code>exec</code></a>. This is <i>not</i> what you want to use to capture the output from a command; for that you should use merely backticks or <a href="CORE.html#qx/STRING/"><code>qx//</code></a>, as described in <a href="https://metacpan.org/pod/distribution/perl/pod/perlop.pod#%60STRING%60">&quot;`STRING`&quot; in perlop</a>. Return value of -1 indicates a failure to start the program or an error of the <a href="http://man.he.net/man2/wait">wait(2)</a> system call (inspect <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$!"><code>$!</code></a> for the reason).</p>

<p>If you&#39;d like to make <a href="CORE.html#system-LIST"><code>system</code></a> (and many other bits of Perl) die on error, have a look at the <a href="https://metacpan.org/pod/autodie">autodie</a> pragma.</p>

<p>Like <a href="CORE.html#exec-LIST"><code>exec</code></a>, <a href="CORE.html#system-LIST"><code>system</code></a> allows you to lie to a program about its name if you use the <code>system PROGRAM LIST</code> syntax. Again, see <a href="CORE.html#exec-LIST"><code>exec</code></a>.</p>

<p>Since <code>SIGINT</code> and <code>SIGQUIT</code> are ignored during the execution of <a href="CORE.html#system-LIST"><code>system</code></a>, if you expect your program to terminate on receipt of these signals you will need to arrange to do so yourself based on the return value.</p>

<pre><code>    my @args = (&quot;command&quot;, &quot;arg1&quot;, &quot;arg2&quot;);
    system(@args) == 0
        or die &quot;system @args failed: $?&quot;;</code></pre>

<p>If you&#39;d like to manually inspect <a href="CORE.html#system-LIST"><code>system</code></a>&#39;s failure, you can check all possible failure modes by inspecting <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$?"><code>$?</code></a> like this:</p>

<pre><code>    if ($? == -1) {
        print &quot;failed to execute: $!\n&quot;;
    }
    elsif ($? &amp; 127) {
        printf &quot;child died with signal %d, %s coredump\n&quot;,
            ($? &amp; 127),  ($? &amp; 128) ? &#39;with&#39; : &#39;without&#39;;
    }
    else {
        printf &quot;child exited with value %d\n&quot;, $? &gt;&gt; 8;
    }</code></pre>

<p>Alternatively, you may inspect the value of <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$%7B%5ECHILD_ERROR_NATIVE%7D"><code>${^CHILD_ERROR_NATIVE}</code></a> with the <a href="https://metacpan.org/pod/distribution/perl/ext/POSIX/lib/POSIX.pod#WIFEXITED"><code>W*()</code></a> calls from the <a href="https://metacpan.org/pod/distribution/perl/ext/POSIX/lib/POSIX.pod">POSIX</a> module.</p>

<p>When <a href="CORE.html#system-LIST"><code>system</code></a>&#39;s arguments are executed indirectly by the shell, results and return codes are subject to its quirks. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlop.pod#%60STRING%60">&quot;`STRING`&quot; in perlop</a> and <a href="CORE.html#exec-LIST"><code>exec</code></a> for details.</p>

<p>Since <a href="CORE.html#system-LIST"><code>system</code></a> does a <a href="CORE.html#fork"><code>fork</code></a> and <a href="CORE.html#wait"><code>wait</code></a> it may affect a <code>SIGCHLD</code> handler. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlipc.pod">perlipc</a> for details.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#system">&quot;system&quot; in perlport</a>.</p>

</dd>
<dt id="syswrite-FILEHANDLE,SCALAR,LENGTH,OFFSET"><a id="syswrite"></a><a id="syswrite-FILEHANDLE-SCALAR-LENGTH-OFFSET"></a>syswrite FILEHANDLE,SCALAR,LENGTH,OFFSET </dt>
<dd>

</dd>
<dt id="syswrite-FILEHANDLE,SCALAR,LENGTH"><a id="syswrite1"></a><a id="syswrite-FILEHANDLE-SCALAR-LENGTH"></a>syswrite FILEHANDLE,SCALAR,LENGTH</dt>
<dd>

</dd>
<dt id="syswrite-FILEHANDLE,SCALAR"><a id="syswrite2"></a><a id="syswrite-FILEHANDLE-SCALAR"></a>syswrite FILEHANDLE,SCALAR</dt>
<dd>

<p>Attempts to write LENGTH bytes of data from variable SCALAR to the specified FILEHANDLE, using <a href="http://man.he.net/man2/write">write(2)</a>. If LENGTH is not specified, writes whole SCALAR. It bypasses any <a href="https://metacpan.org/pod/PerlIO">PerlIO</a> layers including buffered IO (but is affected by the presence of the <code>:utf8</code> layer as described later), so mixing this with reads (other than <code>sysread)</code>), <a href="CORE.html#print-FILEHANDLE-LIST"><code>print</code></a>, <a href="CORE.html#write-FILEHANDLE"><code>write</code></a>, <a href="CORE.html#seek-FILEHANDLE,POSITION,WHENCE"><code>seek</code></a>, <a href="CORE.html#tell-FILEHANDLE"><code>tell</code></a>, or <a href="CORE.html#eof-FILEHANDLE"><code>eof</code></a> may cause confusion because the <code>:perlio</code> and <code>:crlf</code> layers usually buffer data. Returns the number of bytes actually written, or <a href="CORE.html#undef-EXPR"><code>undef</code></a> if there was an error (in this case the errno variable <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$!"><code>$!</code></a> is also set). If the LENGTH is greater than the data available in the SCALAR after the OFFSET, only as much data as is available will be written.</p>

<p>An OFFSET may be specified to write the data from some part of the string other than the beginning. A negative OFFSET specifies writing that many characters counting backwards from the end of the string. If SCALAR is of length zero, you can only use an OFFSET of 0.</p>

<p><b>WARNING</b>: If the filehandle is marked <code>:utf8</code>, <code>syswrite</code> will raise an exception. The <code>:encoding(...)</code> layer implicitly introduces the <code>:utf8</code> layer. Alternately, if the handle is not marked with an encoding but you attempt to write characters with code points over 255, raises an exception. See <a href="CORE.html#binmode-FILEHANDLE,-LAYER"><code>binmode</code></a>, <a href="CORE.html#open-FILEHANDLE,MODE,EXPR"><code>open</code></a>, and the <a href="https://metacpan.org/pod/open">open</a> pragma.</p>

</dd>
<dt id="tell-FILEHANDLE"><a id="tell"></a>tell FILEHANDLE </dt>
<dd>

</dd>
<dt id="tell1">tell</dt>
<dd>

<p>Returns the current position <i>in bytes</i> for FILEHANDLE, or -1 on error. FILEHANDLE may be an expression whose value gives the name of the actual filehandle. If FILEHANDLE is omitted, assumes the file last read.</p>

<p>Note the emphasis on bytes: even if the filehandle has been set to operate on characters (for example using the <code>:encoding(UTF-8)</code> I/O layer), the <a href="CORE.html#seek-FILEHANDLE,POSITION,WHENCE"><code>seek</code></a>, <a href="CORE.html#tell-FILEHANDLE"><code>tell</code></a>, and <a href="CORE.html#sysseek-FILEHANDLE,POSITION,WHENCE"><code>sysseek</code></a> family of functions use byte offsets, not character offsets, because seeking to a character offset would be very slow in a UTF-8 file.</p>

<p>The return value of <a href="CORE.html#tell-FILEHANDLE"><code>tell</code></a> for the standard streams like the STDIN depends on the operating system: it may return -1 or something else. <a href="CORE.html#tell-FILEHANDLE"><code>tell</code></a> on pipes, fifos, and sockets usually returns -1.</p>

<p>There is no <code>systell</code> function. Use <a href="CORE.html#sysseek-FILEHANDLE,POSITION,WHENCE"><code>sysseek($fh, 0, 1)</code></a> for that.</p>

<p>Do not use <a href="CORE.html#tell-FILEHANDLE"><code>tell</code></a> (or other buffered I/O operations) on a filehandle that has been manipulated by <a href="CORE.html#sysread-FILEHANDLE,SCALAR,LENGTH,OFFSET"><code>sysread</code></a>, <a href="CORE.html#syswrite-FILEHANDLE,SCALAR,LENGTH,OFFSET"><code>syswrite</code></a>, or <a href="CORE.html#sysseek-FILEHANDLE,POSITION,WHENCE"><code>sysseek</code></a>. Those functions ignore the buffering, while <a href="CORE.html#tell-FILEHANDLE"><code>tell</code></a> does not.</p>

</dd>
<dt id="telldir-DIRHANDLE"><a id="telldir"></a>telldir DIRHANDLE </dt>
<dd>

<p>Returns the current position of the <a href="CORE.html#readdir-DIRHANDLE"><code>readdir</code></a> routines on DIRHANDLE. Value may be given to <a href="CORE.html#seekdir-DIRHANDLE,POS"><code>seekdir</code></a> to access a particular location in a directory. <a href="CORE.html#telldir-DIRHANDLE"><code>telldir</code></a> has the same caveats about possible directory compaction as the corresponding system library routine.</p>

</dd>
<dt id="tie-VARIABLE,CLASSNAME,LIST"><a id="tie"></a><a id="tie-VARIABLE-CLASSNAME-LIST"></a>tie VARIABLE,CLASSNAME,LIST </dt>
<dd>

<p>This function binds a variable to a package class that will provide the implementation for the variable. VARIABLE is the name of the variable to be enchanted. CLASSNAME is the name of a class implementing objects of correct type. Any additional arguments are passed to the appropriate constructor method of the class (meaning <code>TIESCALAR</code>, <code>TIEHANDLE</code>, <code>TIEARRAY</code>, or <code>TIEHASH</code>). Typically these are arguments such as might be passed to the <a href="http://man.he.net/man3/dbm_open">dbm_open(3)</a> function of C. The object returned by the constructor is also returned by the <a href="CORE.html#tie-VARIABLE,CLASSNAME,LIST"><code>tie</code></a> function, which would be useful if you want to access other methods in CLASSNAME.</p>

<p>Note that functions such as <a href="CORE.html#keys-HASH"><code>keys</code></a> and <a href="CORE.html#values-HASH"><code>values</code></a> may return huge lists when used on large objects, like DBM files. You may prefer to use the <a href="CORE.html#each-HASH"><code>each</code></a> function to iterate over such. Example:</p>

<pre><code>    # print out history file offsets
    use NDBM_File;
    tie(my %HIST, &#39;NDBM_File&#39;, &#39;/usr/lib/news/history&#39;, 1, 0);
    while (my ($key,$val) = each %HIST) {
        print $key, &#39; = &#39;, unpack(&#39;L&#39;, $val), &quot;\n&quot;;
    }</code></pre>

<p>A class implementing a hash should have the following methods:</p>

<pre><code>    TIEHASH classname, LIST
    FETCH this, key
    STORE this, key, value
    DELETE this, key
    CLEAR this
    EXISTS this, key
    FIRSTKEY this
    NEXTKEY this, lastkey
    SCALAR this
    DESTROY this
    UNTIE this</code></pre>

<p>A class implementing an ordinary array should have the following methods:</p>

<pre><code>    TIEARRAY classname, LIST
    FETCH this, key
    STORE this, key, value
    FETCHSIZE this
    STORESIZE this, count
    CLEAR this
    PUSH this, LIST
    POP this
    SHIFT this
    UNSHIFT this, LIST
    SPLICE this, offset, length, LIST
    EXTEND this, count
    DELETE this, key
    EXISTS this, key
    DESTROY this
    UNTIE this</code></pre>

<p>A class implementing a filehandle should have the following methods:</p>

<pre><code>    TIEHANDLE classname, LIST
    READ this, scalar, length, offset
    READLINE this
    GETC this
    WRITE this, scalar, length, offset
    PRINT this, LIST
    PRINTF this, format, LIST
    BINMODE this
    EOF this
    FILENO this
    SEEK this, position, whence
    TELL this
    OPEN this, mode, LIST
    CLOSE this
    DESTROY this
    UNTIE this</code></pre>

<p>A class implementing a scalar should have the following methods:</p>

<pre><code>    TIESCALAR classname, LIST
    FETCH this,
    STORE this, value
    DESTROY this
    UNTIE this</code></pre>

<p>Not all methods indicated above need be implemented. See <a href="https://metacpan.org/pod/distribution/perl/pod/perltie.pod">perltie</a>, <a href="https://metacpan.org/pod/Tie::Hash">Tie::Hash</a>, <a href="https://metacpan.org/pod/Tie::Array">Tie::Array</a>, <a href="https://metacpan.org/pod/Tie::Scalar">Tie::Scalar</a>, and <a href="https://metacpan.org/pod/Tie::Handle">Tie::Handle</a>.</p>

<p>Unlike <a href="CORE.html#dbmopen-HASH,DBNAME,MASK"><code>dbmopen</code></a>, the <a href="CORE.html#tie-VARIABLE,CLASSNAME,LIST"><code>tie</code></a> function will not <a href="CORE.html#use-Module-VERSION-LIST"><code>use</code></a> or <a href="CORE.html#require-VERSION"><code>require</code></a> a module for you; you need to do that explicitly yourself. See <a href="https://metacpan.org/pod/DB_File">DB_File</a> or the <a href="https://metacpan.org/pod/Config">Config</a> module for interesting <a href="CORE.html#tie-VARIABLE,CLASSNAME,LIST"><code>tie</code></a> implementations.</p>

<p>For further details see <a href="https://metacpan.org/pod/distribution/perl/pod/perltie.pod">perltie</a>, <a href="CORE.html#tied-VARIABLE"><code>tied</code></a>.</p>

</dd>
<dt id="tied-VARIABLE"><a id="tied"></a>tied VARIABLE </dt>
<dd>

<p>Returns a reference to the object underlying VARIABLE (the same value that was originally returned by the <a href="CORE.html#tie-VARIABLE,CLASSNAME,LIST"><code>tie</code></a> call that bound the variable to a package.) Returns the undefined value if VARIABLE isn&#39;t tied to a package.</p>

</dd>
<dt id="time">time  </dt>
<dd>

<p>Returns the number of non-leap seconds since whatever time the system considers to be the epoch, suitable for feeding to <a href="CORE.html#gmtime-EXPR"><code>gmtime</code></a> and <a href="CORE.html#localtime-EXPR"><code>localtime</code></a>. On most systems the epoch is 00:00:00 UTC, January 1, 1970; a prominent exception being Mac OS Classic which uses 00:00:00, January 1, 1904 in the current local time zone for its epoch.</p>

<p>For measuring time in better granularity than one second, use the <a href="https://metacpan.org/pod/Time::HiRes">Time::HiRes</a> module from Perl 5.8 onwards (or from CPAN before then), or, if you have <a href="http://man.he.net/man2/gettimeofday">gettimeofday(2)</a>, you may be able to use the <a href="CORE.html#syscall-NUMBER,-LIST"><code>syscall</code></a> interface of Perl. See <a href="https://metacpan.org/pod/perlfaq8">perlfaq8</a> for details.</p>

<p>For date and time processing look at the many related modules on CPAN. For a comprehensive date and time representation look at the <a href="../DateTime.html">DateTime</a> module.</p>

</dd>
<dt id="times">times </dt>
<dd>

<p>Returns a four-element list giving the user and system times in seconds for this process and any exited children of this process.</p>

<pre><code>    my ($user,$system,$cuser,$csystem) = times;</code></pre>

<p>In scalar context, <a href="CORE.html#times"><code>times</code></a> returns <code>$user</code>.</p>

<p>Children&#39;s times are only included for terminated children.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#times">&quot;times&quot; in perlport</a>.</p>

</dd>
<dt id="tr///"><a id="tr"></a>tr///</dt>
<dd>

<p>The transliteration operator. Same as <a href="CORE.html#y///"><code>y///</code></a>. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlop.pod#Quote-Like-Operators">&quot;Quote-Like Operators&quot; in perlop</a>.</p>

</dd>
<dt id="truncate-FILEHANDLE,LENGTH"><a id="truncate"></a><a id="truncate-FILEHANDLE-LENGTH"></a>truncate FILEHANDLE,LENGTH </dt>
<dd>

</dd>
<dt id="truncate-EXPR,LENGTH"><a id="truncate1"></a><a id="truncate-EXPR-LENGTH"></a>truncate EXPR,LENGTH</dt>
<dd>

<p>Truncates the file opened on FILEHANDLE, or named by EXPR, to the specified length. Raises an exception if truncate isn&#39;t implemented on your system. Returns true if successful, <a href="CORE.html#undef-EXPR"><code>undef</code></a> on error.</p>

<p>The behavior is undefined if LENGTH is greater than the length of the file.</p>

<p>The position in the file of FILEHANDLE is left unchanged. You may want to call <a href="CORE.html#seek-FILEHANDLE,POSITION,WHENCE">seek</a> before writing to the file.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#truncate">&quot;truncate&quot; in perlport</a>.</p>

</dd>
<dt id="uc-EXPR"><a id="uc"></a>uc EXPR   </dt>
<dd>

</dd>
<dt id="uc1">uc</dt>
<dd>

<p>Returns an uppercased version of EXPR. If EXPR is omitted, uses <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a>.</p>

<pre><code>    my $str = uc(&quot;Perl is GREAT&quot;); # &quot;PERL IS GREAT&quot;</code></pre>

<p>This function behaves the same way under various pragmas, such as in a locale, as <a href="CORE.html#lc-EXPR"><code>lc</code></a> does.</p>

<p>If you want titlecase mapping on initial letters see <a href="CORE.html#ucfirst-EXPR"><code>ucfirst</code></a> instead.</p>

<p><b>Note:</b> This is the internal function implementing the <a href="https://metacpan.org/pod/distribution/perl/pod/perlop.pod#Quote-and-Quote-like-Operators"><code>\U</code></a> escape in double-quoted strings.</p>

<pre><code>    my $str = &quot;Perl is \Ugreat\E&quot;; # &quot;Perl is GREAT&quot;</code></pre>

</dd>
<dt id="ucfirst-EXPR"><a id="ucfirst"></a>ucfirst EXPR  </dt>
<dd>

</dd>
<dt id="ucfirst1">ucfirst</dt>
<dd>

<p>Returns the value of EXPR with the <b>first</b> character in uppercase (Unicode calls this titlecase). If EXPR is omitted, <code>ucfirst</code> uses <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a>.</p>

<pre><code>    my $str = ucfirst(&quot;hello world!&quot;); # &quot;Hello world!&quot;</code></pre>

<p>This function behaves the same way under various pragmas, such as in a locale, as <a href="CORE.html#lc-EXPR"><code>lc</code></a> does.</p>

<p><b>Note:</b> This is the internal function implementing the <code>\u</code> escape in double-quoted strings.</p>

<pre><code>    my $str = &quot;\uperl\E is great&quot;; # &quot;Perl is great&quot;</code></pre>

</dd>
<dt id="umask-EXPR"><a id="umask"></a>umask EXPR </dt>
<dd>

</dd>
<dt id="umask1">umask</dt>
<dd>

<p>Sets the umask for the process to EXPR and returns the previous value. If EXPR is omitted, merely returns the current umask.</p>

<p>The Unix permission <code>rwxr-x---</code> is represented as three sets of three bits, or three octal digits: <code>0750</code> (the leading 0 indicates octal and isn&#39;t one of the digits). The <a href="CORE.html#umask-EXPR"><code>umask</code></a> value is such a number representing disabled permissions bits. The permission (or &quot;mode&quot;) values you pass <a href="CORE.html#mkdir-FILENAME,MODE"><code>mkdir</code></a> or <a href="CORE.html#sysopen-FILEHANDLE,FILENAME,MODE"><code>sysopen</code></a> are modified by your umask, so even if you tell <a href="CORE.html#sysopen-FILEHANDLE,FILENAME,MODE"><code>sysopen</code></a> to create a file with permissions <code>0777</code>, if your umask is <code>0022</code>, then the file will actually be created with permissions <code>0755</code>. If your <a href="CORE.html#umask-EXPR"><code>umask</code></a> were <code>0027</code> (group can&#39;t write; others can&#39;t read, write, or execute), then passing <a href="CORE.html#sysopen-FILEHANDLE,FILENAME,MODE"><code>sysopen</code></a> <code>0666</code> would create a file with mode <code>0640</code> (because <code>0666 &amp;~ 027</code> is <code>0640</code>).</p>

<p>Here&#39;s some advice: supply a creation mode of <code>0666</code> for regular files (in <a href="CORE.html#sysopen-FILEHANDLE,FILENAME,MODE"><code>sysopen</code></a>) and one of <code>0777</code> for directories (in <a href="CORE.html#mkdir-FILENAME,MODE"><code>mkdir</code></a>) and executable files. This gives users the freedom of choice: if they want protected files, they might choose process umasks of <code>022</code>, <code>027</code>, or even the particularly antisocial mask of <code>077</code>. Programs should rarely if ever make policy decisions better left to the user. The exception to this is when writing files that should be kept private: mail files, web browser cookies, <i>.rhosts</i> files, and so on.</p>

<p>If <a href="http://man.he.net/man2/umask">umask(2)</a> is not implemented on your system and you are trying to restrict access for <i>yourself</i> (i.e., <code>(EXPR &amp; 0700) &gt; 0</code>), raises an exception. If <a href="http://man.he.net/man2/umask">umask(2)</a> is not implemented and you are not trying to restrict access for yourself, returns <a href="CORE.html#undef-EXPR"><code>undef</code></a>.</p>

<p>Remember that a umask is a number, usually given in octal; it is <i>not</i> a string of octal digits. See also <a href="CORE.html#oct-EXPR"><code>oct</code></a>, if all you have is a string.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#umask">&quot;umask&quot; in perlport</a>.</p>

</dd>
<dt id="undef-EXPR"><a id="undef"></a>undef EXPR  </dt>
<dd>

</dd>
<dt id="undef1">undef</dt>
<dd>

<p>Undefines the value of EXPR, which must be an lvalue. Use only on a scalar value, an array (using <code>@</code>), a hash (using <code>%</code>), a subroutine (using <code>&amp;</code>), or a typeglob (using <code>*</code>). Saying <code>undef $hash{$key}</code> will probably not do what you expect on most predefined variables or DBM list values, so don&#39;t do that; see <a href="CORE.html#delete-EXPR"><code>delete</code></a>. Always returns the undefined value. You can omit the EXPR, in which case nothing is undefined, but you still get an undefined value that you could, for instance, return from a subroutine, assign to a variable, or pass as a parameter. Examples:</p>

<pre><code>    undef $foo;
    undef $bar{&#39;blurfl&#39;};      # Compare to: delete $bar{&#39;blurfl&#39;};
    undef @ary;
    undef %hash;
    undef &amp;mysub;
    undef *xyz;       # destroys $xyz, @xyz, %xyz, &amp;xyz, etc.
    return (wantarray ? (undef, $errmsg) : undef) if $they_blew_it;
    select undef, undef, undef, 0.25;
    my ($x, $y, undef, $z) = foo();    # Ignore third value returned</code></pre>

<p>Note that this is a unary operator, not a list operator.</p>

</dd>
<dt id="unlink-LIST"><a id="unlink"></a>unlink LIST     </dt>
<dd>

</dd>
<dt id="unlink1">unlink</dt>
<dd>

<p>Deletes a list of files. On success, it returns the number of files it successfully deleted. On failure, it returns false and sets <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$!"><code>$!</code></a> (errno):</p>

<pre><code>    my $unlinked = unlink &#39;a&#39;, &#39;b&#39;, &#39;c&#39;;
    unlink @goners;
    unlink glob &quot;*.bak&quot;;</code></pre>

<p>On error, <a href="CORE.html#unlink-LIST"><code>unlink</code></a> will not tell you which files it could not remove. If you want to know which files you could not remove, try them one at a time:</p>

<pre><code>     foreach my $file ( @goners ) {
         unlink $file or warn &quot;Could not unlink $file: $!&quot;;
     }</code></pre>

<p>Note: <a href="CORE.html#unlink-LIST"><code>unlink</code></a> will not attempt to delete directories unless you are superuser and the <b>-U</b> flag is supplied to Perl. Even if these conditions are met, be warned that unlinking a directory can inflict damage on your filesystem. Finally, using <a href="CORE.html#unlink-LIST"><code>unlink</code></a> on directories is not supported on many operating systems. Use <a href="CORE.html#rmdir-FILENAME"><code>rmdir</code></a> instead.</p>

<p>If LIST is omitted, <a href="CORE.html#unlink-LIST"><code>unlink</code></a> uses <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a>.</p>

</dd>
<dt id="unpack-TEMPLATE,EXPR"><a id="unpack"></a><a id="unpack-TEMPLATE-EXPR"></a>unpack TEMPLATE,EXPR </dt>
<dd>

</dd>
<dt id="unpack-TEMPLATE"><a id="unpack1"></a>unpack TEMPLATE</dt>
<dd>

<p><a href="CORE.html#unpack-TEMPLATE,EXPR"><code>unpack</code></a> does the reverse of <a href="CORE.html#pack-TEMPLATE,LIST"><code>pack</code></a>: it takes a string and expands it out into a list of values. (In scalar context, it returns merely the first value produced.)</p>

<p>If EXPR is omitted, unpacks the <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$_"><code>$_</code></a> string. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlpacktut.pod">perlpacktut</a> for an introduction to this function.</p>

<p>The string is broken into chunks described by the TEMPLATE. Each chunk is converted separately to a value. Typically, either the string is a result of <a href="CORE.html#pack-TEMPLATE,LIST"><code>pack</code></a>, or the characters of the string represent a C structure of some kind.</p>

<p>The TEMPLATE has the same format as in the <a href="CORE.html#pack-TEMPLATE,LIST"><code>pack</code></a> function. Here&#39;s a subroutine that does substring:</p>

<pre><code>    sub substr {
        my ($what, $where, $howmuch) = @_;
        unpack(&quot;x$where a$howmuch&quot;, $what);
    }</code></pre>

<p>and then there&#39;s</p>

<pre><code>    sub ordinal { unpack(&quot;W&quot;,$_[0]); } # same as ord()</code></pre>

<p>In addition to fields allowed in <a href="CORE.html#pack-TEMPLATE,LIST"><code>pack</code></a>, you may prefix a field with a %&lt;number&gt; to indicate that you want a &lt;number&gt;-bit checksum of the items instead of the items themselves. Default is a 16-bit checksum. The checksum is calculated by summing numeric values of expanded values (for string fields the sum of <code>ord($char)</code> is taken; for bit fields the sum of zeroes and ones).</p>

<p>For example, the following computes the same number as the System V sum program:</p>

<pre><code>    my $checksum = do {
        local $/;  # slurp!
        unpack(&quot;%32W*&quot;, readline) % 65535;
    };</code></pre>

<p>The following efficiently counts the number of set bits in a bit vector:</p>

<pre><code>    my $setbits = unpack(&quot;%32b*&quot;, $selectmask);</code></pre>

<p>The <code>p</code> and <code>P</code> formats should be used with care. Since Perl has no way of checking whether the value passed to <a href="CORE.html#unpack-TEMPLATE,EXPR"><code>unpack</code></a> corresponds to a valid memory location, passing a pointer value that&#39;s not known to be valid is likely to have disastrous consequences.</p>

<p>If there are more pack codes or if the repeat count of a field or a group is larger than what the remainder of the input string allows, the result is not well defined: the repeat count may be decreased, or <a href="CORE.html#unpack-TEMPLATE,EXPR"><code>unpack</code></a> may produce empty strings or zeros, or it may raise an exception. If the input string is longer than one described by the TEMPLATE, the remainder of that input string is ignored.</p>

<p>See <a href="CORE.html#pack-TEMPLATE,LIST"><code>pack</code></a> for more examples and notes.</p>

</dd>
<dt id="unshift-ARRAY,LIST"><a id="unshift"></a><a id="unshift-ARRAY-LIST"></a>unshift ARRAY,LIST </dt>
<dd>

<p>Add one or more elements to the <b>beginning</b> of an array. This is the opposite of a <a href="CORE.html#shift-ARRAY"><code>shift</code></a>.</p>

<pre><code>    my @animals = (&quot;cat&quot;);
    unshift(@animals, &quot;mouse&quot;); # (&quot;mouse&quot;, &quot;cat&quot;)

    my @colors = (&quot;red&quot;);
    unshift(@colors, (&quot;blue&quot;, &quot;green&quot;)); # (&quot;blue&quot;, &quot;green&quot;, &quot;red&quot;)</code></pre>

<p>Returns the new number of elements in the updated array.</p>

<pre><code>    # Return value is the number of items in the updated array
    my $color_count = unshift(@colors, (&quot;yellow&quot;, &quot;purple&quot;));

    say &quot;There are $color_count colors in the updated array&quot;;</code></pre>

<p>Note the LIST is prepended whole, not one element at a time, so the prepended elements stay in the same order. Use <a href="CORE.html#reverse-LIST"><code>reverse</code></a> to do the reverse.</p>

<p>Starting with Perl 5.14, an experimental feature allowed <a href="CORE.html#unshift-ARRAY,LIST"><code>unshift</code></a> to take a scalar expression. This experiment has been deemed unsuccessful, and was removed as of Perl 5.24.</p>

</dd>
<dt id="untie-VARIABLE"><a id="untie"></a>untie VARIABLE </dt>
<dd>

<p>Breaks the binding between a variable and a package. (See <a href="CORE.html#tie-VARIABLE,CLASSNAME,LIST">tie</a>.) Has no effect if the variable is not tied.</p>

</dd>
<dt id="use-Module-VERSION-LIST"><a id="use"></a>use Module VERSION LIST   </dt>
<dd>

</dd>
<dt id="use-Module-VERSION"><a id="use1"></a>use Module VERSION</dt>
<dd>

</dd>
<dt id="use-Module-LIST"><a id="use2"></a>use Module LIST</dt>
<dd>

</dd>
<dt id="use-Module"><a id="use3"></a>use Module</dt>
<dd>

<p>Imports some semantics into the current package from the named module, generally by aliasing certain subroutine or variable names into your package. It is exactly equivalent to</p>

<pre><code>    BEGIN { require Module; Module-&gt;import( LIST ); }</code></pre>

<p>except that Module <i>must</i> be a bareword. The importation can be made conditional by using the <a href="https://metacpan.org/pod/if">if</a> module.</p>

<p>The <code>BEGIN</code> forces the <a href="CORE.html#require-VERSION"><code>require</code></a> and <a href="CORE.html#import-LIST"><code>import</code></a> to happen at compile time. The <a href="CORE.html#require-VERSION"><code>require</code></a> makes sure the module is loaded into memory if it hasn&#39;t been yet. The <a href="CORE.html#import-LIST"><code>import</code></a> is not a builtin; it&#39;s just an ordinary static method call into the <code>Module</code> package to tell the module to import the list of features back into the current package. The module can implement its <a href="CORE.html#import-LIST"><code>import</code></a> method any way it likes, though most modules just choose to derive their <a href="CORE.html#import-LIST"><code>import</code></a> method via inheritance from the <code>Exporter</code> class that is defined in the <a href="https://metacpan.org/pod/Exporter"><code>Exporter</code></a> module. See <a href="https://metacpan.org/pod/Exporter">Exporter</a>. If no <a href="CORE.html#import-LIST"><code>import</code></a> method can be found, then the call is skipped, even if there is an AUTOLOAD method.</p>

<p>If you do not want to call the package&#39;s <a href="CORE.html#import-LIST"><code>import</code></a> method (for instance, to stop your namespace from being altered), explicitly supply the empty list:</p>

<pre><code>    use Module ();</code></pre>

<p>That is exactly equivalent to</p>

<pre><code>    BEGIN { require Module }</code></pre>

<p>If the VERSION argument is present between Module and LIST, then the <a href="CORE.html#use-Module-VERSION-LIST"><code>use</code></a> will call the <code>VERSION</code> method in class Module with the given version as an argument:</p>

<pre><code>    use Module 12.34;</code></pre>

<p>is equivalent to:</p>

<pre><code>    BEGIN { require Module; Module-&gt;VERSION(12.34) }</code></pre>

<p>The <a href="https://metacpan.org/pod/UNIVERSAL#VERSION-(-%5B-REQUIRE-%5D-)">default <code>VERSION</code> method</a>, inherited from the <a href="https://metacpan.org/pod/UNIVERSAL"><code>UNIVERSAL</code></a> class, croaks if the given version is larger than the value of the variable <code>$Module::VERSION</code>.</p>

<p>The VERSION argument cannot be an arbitrary expression. It only counts as a VERSION argument if it is a version number literal, starting with either a digit or <code>v</code> followed by a digit. Anything that doesn&#39;t look like a version literal will be parsed as the start of the LIST. Nevertheless, many attempts to use an arbitrary expression as a VERSION argument will appear to work, because <a href="https://metacpan.org/pod/Exporter">Exporter</a>&#39;s <code>import</code> method handles numeric arguments specially, performing version checks rather than treating them as things to export.</p>

<p>Again, there is a distinction between omitting LIST (<a href="CORE.html#import-LIST"><code>import</code></a> called with no arguments) and an explicit empty LIST <code>()</code> (<a href="CORE.html#import-LIST"><code>import</code></a> not called). Note that there is no comma after VERSION!</p>

<p>Because this is a wide-open interface, pragmas (compiler directives) are also implemented this way. Some of the currently implemented pragmas are:</p>

<pre><code>    use constant;
    use diagnostics;
    use integer;
    use sigtrap  qw(SEGV BUS);
    use strict   qw(subs vars refs);
    use subs     qw(afunc blurfl);
    use warnings qw(all);
    use sort     qw(stable);</code></pre>

<p>Some of these pseudo-modules import semantics into the current block scope (like <a href="https://metacpan.org/pod/strict"><code>strict</code></a> or <a href="https://metacpan.org/pod/integer"><code>integer</code></a>, unlike ordinary modules, which import symbols into the current package (which are effective through the end of the file).</p>

<p>Because <a href="CORE.html#use-Module-VERSION-LIST"><code>use</code></a> takes effect at compile time, it doesn&#39;t respect the ordinary flow control of the code being compiled. In particular, putting a <a href="CORE.html#use-Module-VERSION-LIST"><code>use</code></a> inside the false branch of a conditional doesn&#39;t prevent it from being processed. If a module or pragma only needs to be loaded conditionally, this can be done using the <a href="https://metacpan.org/pod/if">if</a> pragma:</p>

<pre><code>    use if $] &lt; 5.008, &quot;utf8&quot;;
    use if WANT_WARNINGS, warnings =&gt; qw(all);</code></pre>

<p>There&#39;s a corresponding <a href="CORE.html#no-MODULE-VERSION-LIST"><code>no</code></a> declaration that unimports meanings imported by <a href="CORE.html#use-Module-VERSION-LIST"><code>use</code></a>, i.e., it calls <code>Module-&gt;unimport(LIST)</code> instead of <a href="CORE.html#import-LIST"><code>import</code></a>. It behaves just as <a href="CORE.html#import-LIST"><code>import</code></a> does with VERSION, an omitted or empty LIST, or no unimport method being found.</p>

<pre><code>    no integer;
    no strict &#39;refs&#39;;
    no warnings;</code></pre>

<p>See <a href="https://metacpan.org/pod/distribution/perl/pod/perlmodlib.PL">perlmodlib</a> for a list of standard modules and pragmas. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlrun.pod#-m%5B-%5Dmodule">perlrun</a> for the <code>-M</code> and <code>-m</code> command-line options to Perl that give <a href="CORE.html#use-Module-VERSION-LIST"><code>use</code></a> functionality from the command-line.</p>

</dd>
<dt id="use-VERSION"><a id="use4"></a>use VERSION</dt>
<dd>

<p>Lexically enables all features available in the requested version as defined by the <a href="https://metacpan.org/pod/feature">feature</a> pragma, disabling any features not in the requested version&#39;s feature bundle. See <a href="https://metacpan.org/pod/feature">feature</a>.</p>

<p>VERSION may be either a v-string such as v5.24.1, which will be compared to <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$%5EV"><code>$^V</code></a> (aka $PERL_VERSION), or a numeric argument of the form 5.024001, which will be compared to <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$%5D"><code>$]</code></a>. An exception is raised if VERSION is greater than the version of the current Perl interpreter; Perl will not attempt to parse the rest of the file. Compare with <a href="CORE.html#require-VERSION"><code>require</code></a>, which can do a similar check at run time.</p>

<p>If the specified Perl version is 5.12 or higher, strictures are enabled lexically as with <a href="https://metacpan.org/pod/strict"><code>use strict</code></a>. Similarly, if the specified Perl version is 5.35.0 or higher, <a href="https://metacpan.org/pod/warnings">warnings</a> are enabled. Later use of <code>use VERSION</code> will override all behavior of a previous <code>use VERSION</code>, possibly removing the <code>strict</code>, <code>warnings</code>, and <code>feature</code> added by it. <code>use VERSION</code> does not load the <i>feature.pm</i>, <i>strict.pm</i>, or <i>warnings.pm</i> files.</p>

<p>In the current implementation, any explicit use of <code>use strict</code> or <code>no strict</code> overrides <code>use VERSION</code>, even if it comes before it. However, this may be subject to change in a future release of Perl, so new code should not rely on this fact. It is recommended that a <code>use VERSION</code> declaration be the first significant statement within a file (possibly after a <code>package</code> statement or any amount of whitespace or comment), so that its effects happen first, and other pragmata are applied after it.</p>

<p>Specifying VERSION as a numeric argument of the form 5.024001 should generally be avoided as older less readable syntax compared to v5.24.1. Before perl 5.8.0 released in 2002 the more verbose numeric form was the only supported syntax, which is why you might see it in older code.</p>

<pre><code>    use v5.24.1;    # compile time version check
    use 5.24.1;     # ditto
    use 5.024_001;  # ditto; older syntax compatible with perl 5.6</code></pre>

<p>This is often useful if you need to check the current Perl version before <a href="CORE.html#use-Module-VERSION-LIST"><code>use</code></a>ing library modules that won&#39;t work with older versions of Perl. (We try not to do this more than we have to.)</p>

<p>Symmetrically, <code>no VERSION</code> allows you to specify that you want a version of Perl older than the specified one. Historically this was added during early designs of the Raku language (formerly &quot;Perl 6&quot;), so that a Perl 5 program could begin</p>

<pre><code>    no 6;</code></pre>

<p>to declare that it is not a Perl 6 program. As the two languages have different implementations, file naming conventions, and other infrastructure, this feature is now little used in practice and should be avoided in newly-written code.</p>

<p>Care should be taken when using the <code>no VERSION</code> form, as it is <i>only</i> meant to be used to assert that the running Perl is of a earlier version than its argument and <i>not</i> to undo the feature-enabling side effects of <code>use VERSION</code>.</p>

</dd>
<dt id="utime-LIST"><a id="utime"></a>utime LIST </dt>
<dd>

<p>Changes the access and modification times on each file of a list of files. The first two elements of the list must be the NUMERIC access and modification times, in that order. Returns the number of files successfully changed. The inode change time of each file is set to the current time. For example, this code has the same effect as the Unix <a href="http://man.he.net/man1/touch">touch(1)</a> command when the files <i>already exist</i> and belong to the user running the program:</p>

<pre><code>    #!/usr/bin/perl
    my $atime = my $mtime = time;
    utime $atime, $mtime, @ARGV;</code></pre>

<p>Since Perl 5.8.0, if the first two elements of the list are <a href="CORE.html#undef-EXPR"><code>undef</code></a>, the <a href="http://man.he.net/man2/utime">utime(2)</a> syscall from your C library is called with a null second argument. On most systems, this will set the file&#39;s access and modification times to the current time (i.e., equivalent to the example above) and will work even on files you don&#39;t own provided you have write permission:</p>

<pre><code>    for my $file (@ARGV) {
        utime(undef, undef, $file)
            || warn &quot;Couldn&#39;t touch $file: $!&quot;;
    }</code></pre>

<p>Under NFS this will use the time of the NFS server, not the time of the local machine. If there is a time synchronization problem, the NFS server and local machine will have different times. The Unix <a href="http://man.he.net/man1/touch">touch(1)</a> command will in fact normally use this form instead of the one shown in the first example.</p>

<p>Passing only one of the first two elements as <a href="CORE.html#undef-EXPR"><code>undef</code></a> is equivalent to passing a 0 and will not have the effect described when both are <a href="CORE.html#undef-EXPR"><code>undef</code></a>. This also triggers an uninitialized warning.</p>

<p>On systems that support <a href="http://man.he.net/man2/futimes">futimes(2)</a>, you may pass filehandles among the files. On systems that don&#39;t support <a href="http://man.he.net/man2/futimes">futimes(2)</a>, passing filehandles raises an exception. Filehandles must be passed as globs or glob references to be recognized; barewords are considered filenames.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#utime">&quot;utime&quot; in perlport</a>.</p>

</dd>
<dt id="values-HASH"><a id="values"></a>values HASH </dt>
<dd>

</dd>
<dt id="values-ARRAY"><a id="values1"></a>values ARRAY</dt>
<dd>

<p>In list context, returns a list consisting of all the values of the named hash. In Perl 5.12 or later only, will also return a list of the values of an array; prior to that release, attempting to use an array argument will produce a syntax error. In scalar context, returns the number of values.</p>

<p>Hash entries are returned in an apparently random order. The actual random order is specific to a given hash; the exact same series of operations on two hashes may result in a different order for each hash. Any insertion into the hash may change the order, as will any deletion, with the exception that the most recent key returned by <a href="CORE.html#each-HASH"><code>each</code></a> or <a href="CORE.html#keys-HASH"><code>keys</code></a> may be deleted without changing the order. So long as a given hash is unmodified you may rely on <a href="CORE.html#keys-HASH"><code>keys</code></a>, <a href="CORE.html#values-HASH"><code>values</code></a> and <a href="CORE.html#each-HASH"><code>each</code></a> to repeatedly return the same order as each other. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlsec.pod#Algorithmic-Complexity-Attacks">&quot;Algorithmic Complexity Attacks&quot; in perlsec</a> for details on why hash order is randomized. Aside from the guarantees provided here the exact details of Perl&#39;s hash algorithm and the hash traversal order are subject to change in any release of Perl. Tied hashes may behave differently to Perl&#39;s hashes with respect to changes in order on insertion and deletion of items.</p>

<p>As a side effect, calling <a href="CORE.html#values-HASH"><code>values</code></a> resets the HASH or ARRAY&#39;s internal iterator (see <a href="CORE.html#each-HASH"><code>each</code></a>) before yielding the values. In particular, calling <a href="CORE.html#values-HASH"><code>values</code></a> in void context resets the iterator with no other overhead.</p>

<p>Apart from resetting the iterator, <code>values @array</code> in list context is the same as plain <code>@array</code>. (We recommend that you use void context <code>keys @array</code> for this, but reasoned that taking <code>values @array</code> out would require more documentation than leaving it in.)</p>

<p>Note that the values are not copied, which means modifying them will modify the contents of the hash:</p>

<pre><code>    for (values %hash)      { s/foo/bar/g }  # modifies %hash values
    for (@hash{keys %hash}) { s/foo/bar/g }  # same</code></pre>

<p>Starting with Perl 5.14, an experimental feature allowed <a href="CORE.html#values-HASH"><code>values</code></a> to take a scalar expression. This experiment has been deemed unsuccessful, and was removed as of Perl 5.24.</p>

<p>To avoid confusing would-be users of your code who are running earlier versions of Perl with mysterious syntax errors, put this sort of thing at the top of your file to signal that your code will work <i>only</i> on Perls of a recent vintage:</p>

<pre><code>    use v5.12;  # so keys/values/each work on arrays</code></pre>

<p>See also <a href="CORE.html#keys-HASH"><code>keys</code></a>, <a href="CORE.html#each-HASH"><code>each</code></a>, and <a href="CORE.html#sort-SUBNAME-LIST"><code>sort</code></a>.</p>

</dd>
<dt id="vec-EXPR,OFFSET,BITS"><a id="vec"></a><a id="vec-EXPR-OFFSET-BITS"></a>vec EXPR,OFFSET,BITS   </dt>
<dd>

<p>Treats the string in EXPR as a bit vector made up of elements of width BITS and returns the value of the element specified by OFFSET as an unsigned integer. BITS therefore specifies the number of bits that are reserved for each element in the bit vector. This must be a power of two from 1 to 32 (or 64, if your platform supports that).</p>

<p>If BITS is 8, &quot;elements&quot; coincide with bytes of the input string.</p>

<p>If BITS is 16 or more, bytes of the input string are grouped into chunks of size BITS/8, and each group is converted to a number as with <a href="CORE.html#pack-TEMPLATE,LIST"><code>pack</code></a>/<a href="CORE.html#unpack-TEMPLATE,EXPR"><code>unpack</code></a> with big-endian formats <code>n</code>/<code>N</code> (and analogously for BITS==64). See <a href="CORE.html#pack-TEMPLATE,LIST"><code>pack</code></a> for details.</p>

<p>If bits is 4 or less, the string is broken into bytes, then the bits of each byte are broken into 8/BITS groups. Bits of a byte are numbered in a little-endian-ish way, as in <code>0x01</code>, <code>0x02</code>, <code>0x04</code>, <code>0x08</code>, <code>0x10</code>, <code>0x20</code>, <code>0x40</code>, <code>0x80</code>. For example, breaking the single input byte <code>chr(0x36)</code> into two groups gives a list <code>(0x6, 0x3)</code>; breaking it into 4 groups gives <code>(0x2, 0x1, 0x3, 0x0)</code>.</p>

<p><a href="CORE.html#vec-EXPR,OFFSET,BITS"><code>vec</code></a> may also be assigned to, in which case parentheses are needed to give the expression the correct precedence as in</p>

<pre><code>    vec($image, $max_x * $x + $y, 8) = 3;</code></pre>

<p>If the selected element is outside the string, the value 0 is returned. If an element off the end of the string is written to, Perl will first extend the string with sufficiently many zero bytes. It is an error to try to write off the beginning of the string (i.e., negative OFFSET).</p>

<p>If the string happens to be encoded as UTF-8 internally (and thus has the UTF8 flag set), <a href="CORE.html#vec-EXPR,OFFSET,BITS"><code>vec</code></a> tries to convert it to use a one-byte-per-character internal representation. However, if the string contains characters with values of 256 or higher, a fatal error will occur.</p>

<p>Strings created with <a href="CORE.html#vec-EXPR,OFFSET,BITS"><code>vec</code></a> can also be manipulated with the logical operators <code>|</code>, <code>&amp;</code>, <code>^</code>, and <code>~</code>. These operators will assume a bit vector operation is desired when both operands are strings. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlop.pod#Bitwise-String-Operators">&quot;Bitwise String Operators&quot; in perlop</a>.</p>

<p>The following code will build up an ASCII string saying <code>&#39;PerlPerlPerl&#39;</code>. The comments show the string after each step. Note that this code works in the same way on big-endian or little-endian machines.</p>

<pre><code>    my $foo = &#39;&#39;;
    vec($foo,  0, 32) = 0x5065726C; # &#39;Perl&#39;

    # $foo eq &quot;Perl&quot; eq &quot;\x50\x65\x72\x6C&quot;, 32 bits
    print vec($foo, 0, 8);  # prints 80 == 0x50 == ord(&#39;P&#39;)

    vec($foo,  2, 16) = 0x5065; # &#39;PerlPe&#39;
    vec($foo,  3, 16) = 0x726C; # &#39;PerlPerl&#39;
    vec($foo,  8,  8) = 0x50;   # &#39;PerlPerlP&#39;
    vec($foo,  9,  8) = 0x65;   # &#39;PerlPerlPe&#39;
    vec($foo, 20,  4) = 2;      # &#39;PerlPerlPe&#39;   . &quot;\x02&quot;
    vec($foo, 21,  4) = 7;      # &#39;PerlPerlPer&#39;
                                   # &#39;r&#39; is &quot;\x72&quot;
    vec($foo, 45,  2) = 3;      # &#39;PerlPerlPer&#39;  . &quot;\x0c&quot;
    vec($foo, 93,  1) = 1;      # &#39;PerlPerlPer&#39;  . &quot;\x2c&quot;
    vec($foo, 94,  1) = 1;      # &#39;PerlPerlPerl&#39;
                                   # &#39;l&#39; is &quot;\x6c&quot;</code></pre>

<p>To transform a bit vector into a string or list of 0&#39;s and 1&#39;s, use these:</p>

<pre><code>    my $bits = unpack(&quot;b*&quot;, $vector);
    my @bits = split(//, unpack(&quot;b*&quot;, $vector));</code></pre>

<p>If you know the exact length in bits, it can be used in place of the <code>*</code>.</p>

<p>Here is an example to illustrate how the bits actually fall in place:</p>

<pre><code>  #!/usr/bin/perl -wl

  print &lt;&lt;&#39;EOT&#39;;
                                    0         1         2         3
                     unpack(&quot;V&quot;,$_) 01234567890123456789012345678901
  ------------------------------------------------------------------
  EOT

  for $w (0..3) {
      $width = 2**$w;
      for ($shift=0; $shift &lt; $width; ++$shift) {
          for ($off=0; $off &lt; 32/$width; ++$off) {
              $str = pack(&quot;B*&quot;, &quot;0&quot;x32);
              $bits = (1&lt;&lt;$shift);
              vec($str, $off, $width) = $bits;
              $res = unpack(&quot;b*&quot;,$str);
              $val = unpack(&quot;V&quot;, $str);
              write;
          }
      }
  }

  format STDOUT =
  vec($_,@#,@#) = @&lt;&lt; == @######### @&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;
  $off, $width, $bits, $val, $res
  .
  __END__</code></pre>

<p>Regardless of the machine architecture on which it runs, the example above should print the following table:</p>

<pre><code>                                    0         1         2         3
                     unpack(&quot;V&quot;,$_) 01234567890123456789012345678901
  ------------------------------------------------------------------
  vec($_, 0, 1) = 1   ==          1 10000000000000000000000000000000
  vec($_, 1, 1) = 1   ==          2 01000000000000000000000000000000
  vec($_, 2, 1) = 1   ==          4 00100000000000000000000000000000
  vec($_, 3, 1) = 1   ==          8 00010000000000000000000000000000
  vec($_, 4, 1) = 1   ==         16 00001000000000000000000000000000
  vec($_, 5, 1) = 1   ==         32 00000100000000000000000000000000
  vec($_, 6, 1) = 1   ==         64 00000010000000000000000000000000
  vec($_, 7, 1) = 1   ==        128 00000001000000000000000000000000
  vec($_, 8, 1) = 1   ==        256 00000000100000000000000000000000
  vec($_, 9, 1) = 1   ==        512 00000000010000000000000000000000
  vec($_,10, 1) = 1   ==       1024 00000000001000000000000000000000
  vec($_,11, 1) = 1   ==       2048 00000000000100000000000000000000
  vec($_,12, 1) = 1   ==       4096 00000000000010000000000000000000
  vec($_,13, 1) = 1   ==       8192 00000000000001000000000000000000
  vec($_,14, 1) = 1   ==      16384 00000000000000100000000000000000
  vec($_,15, 1) = 1   ==      32768 00000000000000010000000000000000
  vec($_,16, 1) = 1   ==      65536 00000000000000001000000000000000
  vec($_,17, 1) = 1   ==     131072 00000000000000000100000000000000
  vec($_,18, 1) = 1   ==     262144 00000000000000000010000000000000
  vec($_,19, 1) = 1   ==     524288 00000000000000000001000000000000
  vec($_,20, 1) = 1   ==    1048576 00000000000000000000100000000000
  vec($_,21, 1) = 1   ==    2097152 00000000000000000000010000000000
  vec($_,22, 1) = 1   ==    4194304 00000000000000000000001000000000
  vec($_,23, 1) = 1   ==    8388608 00000000000000000000000100000000
  vec($_,24, 1) = 1   ==   16777216 00000000000000000000000010000000
  vec($_,25, 1) = 1   ==   33554432 00000000000000000000000001000000
  vec($_,26, 1) = 1   ==   67108864 00000000000000000000000000100000
  vec($_,27, 1) = 1   ==  134217728 00000000000000000000000000010000
  vec($_,28, 1) = 1   ==  268435456 00000000000000000000000000001000
  vec($_,29, 1) = 1   ==  536870912 00000000000000000000000000000100
  vec($_,30, 1) = 1   == 1073741824 00000000000000000000000000000010
  vec($_,31, 1) = 1   == 2147483648 00000000000000000000000000000001
  vec($_, 0, 2) = 1   ==          1 10000000000000000000000000000000
  vec($_, 1, 2) = 1   ==          4 00100000000000000000000000000000
  vec($_, 2, 2) = 1   ==         16 00001000000000000000000000000000
  vec($_, 3, 2) = 1   ==         64 00000010000000000000000000000000
  vec($_, 4, 2) = 1   ==        256 00000000100000000000000000000000
  vec($_, 5, 2) = 1   ==       1024 00000000001000000000000000000000
  vec($_, 6, 2) = 1   ==       4096 00000000000010000000000000000000
  vec($_, 7, 2) = 1   ==      16384 00000000000000100000000000000000
  vec($_, 8, 2) = 1   ==      65536 00000000000000001000000000000000
  vec($_, 9, 2) = 1   ==     262144 00000000000000000010000000000000
  vec($_,10, 2) = 1   ==    1048576 00000000000000000000100000000000
  vec($_,11, 2) = 1   ==    4194304 00000000000000000000001000000000
  vec($_,12, 2) = 1   ==   16777216 00000000000000000000000010000000
  vec($_,13, 2) = 1   ==   67108864 00000000000000000000000000100000
  vec($_,14, 2) = 1   ==  268435456 00000000000000000000000000001000
  vec($_,15, 2) = 1   == 1073741824 00000000000000000000000000000010
  vec($_, 0, 2) = 2   ==          2 01000000000000000000000000000000
  vec($_, 1, 2) = 2   ==          8 00010000000000000000000000000000
  vec($_, 2, 2) = 2   ==         32 00000100000000000000000000000000
  vec($_, 3, 2) = 2   ==        128 00000001000000000000000000000000
  vec($_, 4, 2) = 2   ==        512 00000000010000000000000000000000
  vec($_, 5, 2) = 2   ==       2048 00000000000100000000000000000000
  vec($_, 6, 2) = 2   ==       8192 00000000000001000000000000000000
  vec($_, 7, 2) = 2   ==      32768 00000000000000010000000000000000
  vec($_, 8, 2) = 2   ==     131072 00000000000000000100000000000000
  vec($_, 9, 2) = 2   ==     524288 00000000000000000001000000000000
  vec($_,10, 2) = 2   ==    2097152 00000000000000000000010000000000
  vec($_,11, 2) = 2   ==    8388608 00000000000000000000000100000000
  vec($_,12, 2) = 2   ==   33554432 00000000000000000000000001000000
  vec($_,13, 2) = 2   ==  134217728 00000000000000000000000000010000
  vec($_,14, 2) = 2   ==  536870912 00000000000000000000000000000100
  vec($_,15, 2) = 2   == 2147483648 00000000000000000000000000000001
  vec($_, 0, 4) = 1   ==          1 10000000000000000000000000000000
  vec($_, 1, 4) = 1   ==         16 00001000000000000000000000000000
  vec($_, 2, 4) = 1   ==        256 00000000100000000000000000000000
  vec($_, 3, 4) = 1   ==       4096 00000000000010000000000000000000
  vec($_, 4, 4) = 1   ==      65536 00000000000000001000000000000000
  vec($_, 5, 4) = 1   ==    1048576 00000000000000000000100000000000
  vec($_, 6, 4) = 1   ==   16777216 00000000000000000000000010000000
  vec($_, 7, 4) = 1   ==  268435456 00000000000000000000000000001000
  vec($_, 0, 4) = 2   ==          2 01000000000000000000000000000000
  vec($_, 1, 4) = 2   ==         32 00000100000000000000000000000000
  vec($_, 2, 4) = 2   ==        512 00000000010000000000000000000000
  vec($_, 3, 4) = 2   ==       8192 00000000000001000000000000000000
  vec($_, 4, 4) = 2   ==     131072 00000000000000000100000000000000
  vec($_, 5, 4) = 2   ==    2097152 00000000000000000000010000000000
  vec($_, 6, 4) = 2   ==   33554432 00000000000000000000000001000000
  vec($_, 7, 4) = 2   ==  536870912 00000000000000000000000000000100
  vec($_, 0, 4) = 4   ==          4 00100000000000000000000000000000
  vec($_, 1, 4) = 4   ==         64 00000010000000000000000000000000
  vec($_, 2, 4) = 4   ==       1024 00000000001000000000000000000000
  vec($_, 3, 4) = 4   ==      16384 00000000000000100000000000000000
  vec($_, 4, 4) = 4   ==     262144 00000000000000000010000000000000
  vec($_, 5, 4) = 4   ==    4194304 00000000000000000000001000000000
  vec($_, 6, 4) = 4   ==   67108864 00000000000000000000000000100000
  vec($_, 7, 4) = 4   == 1073741824 00000000000000000000000000000010
  vec($_, 0, 4) = 8   ==          8 00010000000000000000000000000000
  vec($_, 1, 4) = 8   ==        128 00000001000000000000000000000000
  vec($_, 2, 4) = 8   ==       2048 00000000000100000000000000000000
  vec($_, 3, 4) = 8   ==      32768 00000000000000010000000000000000
  vec($_, 4, 4) = 8   ==     524288 00000000000000000001000000000000
  vec($_, 5, 4) = 8   ==    8388608 00000000000000000000000100000000
  vec($_, 6, 4) = 8   ==  134217728 00000000000000000000000000010000
  vec($_, 7, 4) = 8   == 2147483648 00000000000000000000000000000001
  vec($_, 0, 8) = 1   ==          1 10000000000000000000000000000000
  vec($_, 1, 8) = 1   ==        256 00000000100000000000000000000000
  vec($_, 2, 8) = 1   ==      65536 00000000000000001000000000000000
  vec($_, 3, 8) = 1   ==   16777216 00000000000000000000000010000000
  vec($_, 0, 8) = 2   ==          2 01000000000000000000000000000000
  vec($_, 1, 8) = 2   ==        512 00000000010000000000000000000000
  vec($_, 2, 8) = 2   ==     131072 00000000000000000100000000000000
  vec($_, 3, 8) = 2   ==   33554432 00000000000000000000000001000000
  vec($_, 0, 8) = 4   ==          4 00100000000000000000000000000000
  vec($_, 1, 8) = 4   ==       1024 00000000001000000000000000000000
  vec($_, 2, 8) = 4   ==     262144 00000000000000000010000000000000
  vec($_, 3, 8) = 4   ==   67108864 00000000000000000000000000100000
  vec($_, 0, 8) = 8   ==          8 00010000000000000000000000000000
  vec($_, 1, 8) = 8   ==       2048 00000000000100000000000000000000
  vec($_, 2, 8) = 8   ==     524288 00000000000000000001000000000000
  vec($_, 3, 8) = 8   ==  134217728 00000000000000000000000000010000
  vec($_, 0, 8) = 16  ==         16 00001000000000000000000000000000
  vec($_, 1, 8) = 16  ==       4096 00000000000010000000000000000000
  vec($_, 2, 8) = 16  ==    1048576 00000000000000000000100000000000
  vec($_, 3, 8) = 16  ==  268435456 00000000000000000000000000001000
  vec($_, 0, 8) = 32  ==         32 00000100000000000000000000000000
  vec($_, 1, 8) = 32  ==       8192 00000000000001000000000000000000
  vec($_, 2, 8) = 32  ==    2097152 00000000000000000000010000000000
  vec($_, 3, 8) = 32  ==  536870912 00000000000000000000000000000100
  vec($_, 0, 8) = 64  ==         64 00000010000000000000000000000000
  vec($_, 1, 8) = 64  ==      16384 00000000000000100000000000000000
  vec($_, 2, 8) = 64  ==    4194304 00000000000000000000001000000000
  vec($_, 3, 8) = 64  == 1073741824 00000000000000000000000000000010
  vec($_, 0, 8) = 128 ==        128 00000001000000000000000000000000
  vec($_, 1, 8) = 128 ==      32768 00000000000000010000000000000000
  vec($_, 2, 8) = 128 ==    8388608 00000000000000000000000100000000
  vec($_, 3, 8) = 128 == 2147483648 00000000000000000000000000000001</code></pre>

</dd>
<dt id="wait">wait </dt>
<dd>

<p>Behaves like <a href="http://man.he.net/man2/wait">wait(2)</a> on your system: it waits for a child process to terminate and returns the pid of the deceased process, or <code>-1</code> if there are no child processes. The status is returned in <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$?"><code>$?</code></a> and <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$%7B%5ECHILD_ERROR_NATIVE%7D"><code>${^CHILD_ERROR_NATIVE}</code></a>. Note that a return value of <code>-1</code> could mean that child processes are being automatically reaped, as described in <a href="https://metacpan.org/pod/distribution/perl/pod/perlipc.pod">perlipc</a>.</p>

<p>If you use <a href="CORE.html#wait"><code>wait</code></a> in your handler for <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#%25SIG"><code>$SIG{CHLD}</code></a>, it may accidentally wait for the child created by <a href="CORE.html#qx/STRING/"><code>qx</code></a> or <a href="CORE.html#system-LIST"><code>system</code></a>. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlipc.pod">perlipc</a> for details.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#wait">&quot;wait&quot; in perlport</a>.</p>

</dd>
<dt id="waitpid-PID,FLAGS"><a id="waitpid"></a><a id="waitpid-PID-FLAGS"></a>waitpid PID,FLAGS </dt>
<dd>

<p>Waits for a particular child process to terminate and returns the pid of the deceased process, or <code>-1</code> if there is no such child process. A non-blocking wait (with <a href="https://metacpan.org/pod/distribution/perl/ext/POSIX/lib/POSIX.pod#WNOHANG">WNOHANG</a> in FLAGS) can return 0 if there are child processes matching PID but none have terminated yet. The status is returned in <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$?"><code>$?</code></a> and <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$%7B%5ECHILD_ERROR_NATIVE%7D"><code>${^CHILD_ERROR_NATIVE}</code></a>.</p>

<p>A PID of <code>0</code> indicates to wait for any child process whose process group ID is equal to that of the current process. A PID of less than <code>-1</code> indicates to wait for any child process whose process group ID is equal to -PID. A PID of <code>-1</code> indicates to wait for any child process.</p>

<p>If you say</p>

<pre><code>    use POSIX &quot;:sys_wait_h&quot;;

    my $kid;
    do {
        $kid = waitpid(-1, WNOHANG);
    } while $kid &gt; 0;</code></pre>

<p>or</p>

<pre><code>    1 while waitpid(-1, WNOHANG) &gt; 0;</code></pre>

<p>then you can do a non-blocking wait for all pending zombie processes (see <a href="https://metacpan.org/pod/distribution/perl/ext/POSIX/lib/POSIX.pod#WAIT">&quot;WAIT&quot; in POSIX</a>). Non-blocking wait is available on machines supporting either the <a href="http://man.he.net/man2/waitpid">waitpid(2)</a> or <a href="http://man.he.net/man2/wait4">wait4(2)</a> syscalls. However, waiting for a particular pid with FLAGS of <code>0</code> is implemented everywhere. (Perl emulates the system call by remembering the status values of processes that have exited but have not been harvested by the Perl script yet.)</p>

<p>Note that on some systems, a return value of <code>-1</code> could mean that child processes are being automatically reaped. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlipc.pod">perlipc</a> for details, and for other examples.</p>

<p>Portability issues: <a href="https://metacpan.org/pod/distribution/perl/pod/perlport.pod#waitpid">&quot;waitpid&quot; in perlport</a>.</p>

</dd>
<dt id="wantarray">wantarray  </dt>
<dd>

<p>Returns true if the context of the currently executing subroutine or <a href="CORE.html#eval-EXPR"><code>eval</code></a> is looking for a list value. Returns false if the context is looking for a scalar. Returns the undefined value if the context is looking for no value (void context).</p>

<pre><code>    return unless defined wantarray; # don&#39;t bother doing more
    my @a = complex_calculation();
    return wantarray ? @a : &quot;@a&quot;;</code></pre>

<p><a href="CORE.html#wantarray"><code>wantarray</code></a>&#39;s result is unspecified in the top level of a file, in a <code>BEGIN</code>, <code>UNITCHECK</code>, <code>CHECK</code>, <code>INIT</code> or <code>END</code> block, or in a <code>DESTROY</code> method.</p>

<p>This function should have been named wantlist() instead.</p>

</dd>
<dt id="warn-LIST"><a id="warn"></a>warn LIST   </dt>
<dd>

<p>Emits a warning, usually by printing it to <code>STDERR</code>. <code>warn</code> interprets its operand LIST in the same way as <code>die</code>, but is slightly different in what it defaults to when LIST is empty or makes an empty string. If it is empty and <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$@"><code>$@</code></a> already contains an exception value then that value is used after appending <code>&quot;\t...caught&quot;</code>. If it is empty and <code>$@</code> is also empty then the string <code>&quot;Warning: Something&#39;s wrong&quot;</code> is used.</p>

<p>By default, the exception derived from the operand LIST is stringified and printed to <code>STDERR</code>. This behaviour can be altered by installing a <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#%25SIG"><code>$SIG{__WARN__}</code></a> handler. If there is such a handler then no message is automatically printed; it is the handler&#39;s responsibility to deal with the exception as it sees fit (like, for instance, converting it into a <a href="CORE.html#die-LIST"><code>die</code></a>). Most handlers must therefore arrange to actually display the warnings that they are not prepared to deal with, by calling <a href="CORE.html#warn-LIST"><code>warn</code></a> again in the handler. Note that this is quite safe and will not produce an endless loop, since <code>__WARN__</code> hooks are not called from inside one.</p>

<p>You will find this behavior is slightly different from that of <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#%25SIG"><code>$SIG{__DIE__}</code></a> handlers (which don&#39;t suppress the error text, but can instead call <a href="CORE.html#die-LIST"><code>die</code></a> again to change it).</p>

<p>Using a <code>__WARN__</code> handler provides a powerful way to silence all warnings (even the so-called mandatory ones). An example:</p>

<pre><code>    # wipe out *all* compile-time warnings
    BEGIN { $SIG{&#39;__WARN__&#39;} = sub { warn $_[0] if $DOWARN } }
    my $foo = 10;
    my $foo = 20;          # no warning about duplicate my $foo,
                           # but hey, you asked for it!
    # no compile-time or run-time warnings before here
    $DOWARN = 1;

    # run-time warnings enabled after here
    warn &quot;\$foo is alive and $foo!&quot;;     # does show up</code></pre>

<p>See <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod">perlvar</a> for details on setting <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#%25SIG"><code>%SIG</code></a> entries and for more examples. See the <a href="https://metacpan.org/pod/Carp">Carp</a> module for other kinds of warnings using its <code>carp</code> and <code>cluck</code> functions.</p>

</dd>
<dt id="write-FILEHANDLE"><a id="write"></a>write FILEHANDLE </dt>
<dd>

</dd>
<dt id="write-EXPR"><a id="write1"></a>write EXPR</dt>
<dd>

</dd>
<dt id="write2">write</dt>
<dd>

<p>Writes a formatted record (possibly multi-line) to the specified FILEHANDLE, using the format associated with that file. By default the format for a file is the one having the same name as the filehandle, but the format for the current output channel (see the <a href="CORE.html#select-FILEHANDLE"><code>select</code></a> function) may be set explicitly by assigning the name of the format to the <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$~"><code>$~</code></a> variable.</p>

<p>Top of form processing is handled automatically: if there is insufficient room on the current page for the formatted record, the page is advanced by writing a form feed and a special top-of-page format is used to format the new page header before the record is written. By default, the top-of-page format is the name of the filehandle with <code>_TOP</code> appended, or <code>top</code> in the current package if the former does not exist. This would be a problem with autovivified filehandles, but it may be dynamically set to the format of your choice by assigning the name to the <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$%5E"><code>$^</code></a> variable while that filehandle is selected. The number of lines remaining on the current page is in variable <a href="https://metacpan.org/pod/distribution/perl/pod/perlvar.pod#$-"><code>$-</code></a>, which can be set to <code>0</code> to force a new page.</p>

<p>If FILEHANDLE is unspecified, output goes to the current default output channel, which starts out as STDOUT but may be changed by the <a href="CORE.html#select-FILEHANDLE"><code>select</code></a> operator. If the FILEHANDLE is an EXPR, then the expression is evaluated and the resulting string is used to look up the name of the FILEHANDLE at run time. For more on formats, see <a href="https://metacpan.org/pod/distribution/perl/pod/perlform.pod">perlform</a>.</p>

<p>Note that write is <i>not</i> the opposite of <a href="CORE.html#read-FILEHANDLE,SCALAR,LENGTH,OFFSET"><code>read</code></a>. Unfortunately.</p>

</dd>
<dt id="y///"><a id="y"></a>y///</dt>
<dd>

<p>The transliteration operator. Same as <a href="CORE.html#tr///"><code>tr///</code></a>. See <a href="https://metacpan.org/pod/distribution/perl/pod/perlop.pod#Quote-Like-Operators">&quot;Quote-Like Operators&quot; in perlop</a>.</p>

</dd>
</dl>

<h2 id="Non-function-Keywords-by-Cross-reference"><a id="Non1"></a>Non-function Keywords by Cross-reference</h2>

<h3 id="perldata">perldata</h3>

<dl>

<dt id="__DATA__"><a id="DATA__"></a>__DATA__</dt>
<dd>

</dd>
<dt id="__END__"><a id="END__"></a>__END__</dt>
<dd>

<p>These keywords are documented in <a href="https://metacpan.org/pod/distribution/perl/pod/perldata.pod#Special-Literals">&quot;Special Literals&quot; in perldata</a>.</p>

</dd>
</dl>

<h3 id="perlmod">perlmod</h3>

<dl>

<dt id="BEGIN">BEGIN</dt>
<dd>

</dd>
<dt id="CHECK">CHECK</dt>
<dd>

</dd>
<dt id="END">END</dt>
<dd>

</dd>
<dt id="INIT">INIT</dt>
<dd>

</dd>
<dt id="UNITCHECK">UNITCHECK</dt>
<dd>

<p>These compile phase keywords are documented in <a href="https://metacpan.org/pod/distribution/perl/pod/perlmod.pod#BEGIN,-UNITCHECK,-CHECK,-INIT-and-END">&quot;BEGIN, UNITCHECK, CHECK, INIT and END&quot; in perlmod</a>.</p>

</dd>
</dl>

<h3 id="perlobj">perlobj</h3>

<dl>

<dt id="DESTROY">DESTROY</dt>
<dd>

<p>This method keyword is documented in <a href="https://metacpan.org/pod/distribution/perl/pod/perlobj.pod#Destructors">&quot;Destructors&quot; in perlobj</a>.</p>

</dd>
</dl>

<h3 id="perlop">perlop</h3>

<dl>

<dt id="and">and</dt>
<dd>

</dd>
<dt id="cmp">cmp</dt>
<dd>

</dd>
<dt id="eq">eq</dt>
<dd>

</dd>
<dt id="ge">ge</dt>
<dd>

</dd>
<dt id="gt">gt</dt>
<dd>

</dd>
<dt id="isa">isa</dt>
<dd>

</dd>
<dt id="le">le</dt>
<dd>

</dd>
<dt id="lt">lt</dt>
<dd>

</dd>
<dt id="ne">ne</dt>
<dd>

</dd>
<dt id="not">not</dt>
<dd>

</dd>
<dt id="or">or</dt>
<dd>

</dd>
<dt id="x">x</dt>
<dd>

</dd>
<dt id="xor">xor</dt>
<dd>

<p>These operators are documented in <a href="https://metacpan.org/pod/distribution/perl/pod/perlop.pod">perlop</a>.</p>

</dd>
</dl>

<h3 id="perlsub">perlsub</h3>

<dl>

<dt id="AUTOLOAD">AUTOLOAD</dt>
<dd>

<p>This keyword is documented in <a href="https://metacpan.org/pod/distribution/perl/pod/perlsub.pod#Autoloading">&quot;Autoloading&quot; in perlsub</a>.</p>

</dd>
</dl>

<h3 id="perlsyn">perlsyn</h3>

<dl>

<dt id="else">else</dt>
<dd>

</dd>
<dt id="elsif">elsif</dt>
<dd>

</dd>
<dt id="for">for</dt>
<dd>

</dd>
<dt id="foreach">foreach</dt>
<dd>

</dd>
<dt id="if">if</dt>
<dd>

</dd>
<dt id="unless">unless</dt>
<dd>

</dd>
<dt id="until">until</dt>
<dd>

</dd>
<dt id="while">while</dt>
<dd>

<p>These flow-control keywords are documented in <a href="https://metacpan.org/pod/distribution/perl/pod/perlsyn.pod#Compound-Statements">&quot;Compound Statements&quot; in perlsyn</a>.</p>

</dd>
<dt id="elseif">elseif</dt>
<dd>

<p>The &quot;else if&quot; keyword is spelled <code>elsif</code> in Perl. There&#39;s no <code>elif</code> or <code>else if</code> either. It does parse <code>elseif</code>, but only to warn you about not using it.</p>

<p>See the documentation for flow-control keywords in <a href="https://metacpan.org/pod/distribution/perl/pod/perlsyn.pod#Compound-Statements">&quot;Compound Statements&quot; in perlsyn</a>.</p>

</dd>
</dl>

<dl>

<dt id="default">default</dt>
<dd>

</dd>
<dt id="given">given</dt>
<dd>

</dd>
<dt id="when">when</dt>
<dd>

<p>These flow-control keywords related to the experimental switch feature are documented in <a href="https://metacpan.org/pod/distribution/perl/pod/perlsyn.pod#Switch-Statements">&quot;Switch Statements&quot; in perlsyn</a>.</p>

</dd>
</dl>

<dl>

<dt id="try">try</dt>
<dd>

</dd>
<dt id="catch">catch</dt>
<dd>

</dd>
<dt id="finally">finally</dt>
<dd>

<p>These flow-control keywords related to the experimental <code>try</code> feature are documented in <a href="https://metacpan.org/pod/distribution/perl/pod/perlsyn.pod#Try-Catch-Exception-Handling">&quot;Try Catch Exception Handling&quot; in perlsyn</a>.</p>

</dd>
</dl>

<dl>

<dt id="defer">defer</dt>
<dd>

<p>This flow-control keyword related to the experimental <code>defer</code> feature is documented in <a href="https://metacpan.org/pod/distribution/perl/pod/perlsyn.pod#defer-blocks">&quot;defer blocks&quot; in perlsyn</a>.</p>

</dd>
</dl>

<dl>

<dt id="ADJUST">ADJUST</dt>
<dd>

<p>This class-related phaser block is documented in <a href="https://metacpan.org/pod/distribution/perl/pod/perlclass.pod">perlclass</a>.</p>

</dd>
</dl></div>

<div id="metacpan_install-instructions-dialog" class="modal fade">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title">Module Install Instructions</h4>
      </div>
      <div class="modal-body">
        <p>To install less, copy and paste the appropriate command in to your terminal.</p>
        <p><a href="https://metacpan.org/dist/App-cpanminus/view/bin/cpanm">cpanm</a></p>
        <pre><code>cpanm less</code></pre>
        <p><a href="https://metacpan.org/pod/CPAN">CPAN shell</a></p>
        <pre><code>perl -MCPAN -e shell
install less</code></pre>
        <p>For more information on module installation, please visit <a href="https://www.cpan.org/modules/INSTALL.html">the detailed CPAN module installation guide</a>.</p>
      </div>
      <div class="modal-footer">
        <a href="CORE.html#" data-dismiss="modal" class="btn">Close</a>
      </div>
    </div>
  </div>
</div>
          </main>
          <div class="content-pagination">
          </div>
        </div>
        <footer class="footer">
          <div class="footer-container">
            <div class="footer-social">
              <div class="footer-link footer-logo">
                <a href="https://metacpan.org/">
                  <img src="https://metacpan.org/static/images/metacpan-logo.svg" alt="MetaCPAN" />
                </a>
              </div>
              <a class="footer-social-link" href="https://github.com/metacpan">
                <i class="fab fa-github-square"></i>
              </a>
              <a class="footer-social-link" href="https://fosstodon.org/@metacpan">
                <i class="fab fa-mastodon"></i>
              </a>
            </div>
            <div class="footer-links">
              <div class="footer-link">
                  <a href="https://metacpan.org/about">About</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/about/sponsors">Sponsor</a>
              </div>
              <div class="footer-link">
                  <a href="https://grep.metacpan.org">grep::cpan</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/recent">Recent</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/about/faq">FAQ</a>
              </div>
              <div class="footer-link">
                  <a href="https://metacpan.org/tools">Tools</a>
              </div>
              <div class="footer-link">
                  <a href="https://fastapi.metacpan.org/">API</a>
              </div>
              <div class="footer-link">
                  <a href="https://www.perl.org/">Perl.org</a>
              </div>
            </div>
            <div class="footer-sponsors">
              <a class="footer-sponsor-link" target="_blank" href="https://www.bytemark.co.uk/" rel="noopener">
                <img class="footer-sponsor-bytemark" src="https://metacpan.org/static/images/sponsors/bytemark_logo.svg" alt="Bytemark logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://www.liquidweb.com/" rel="noopener">
                <img class="footer-sponsor-liquidweb" src="https://metacpan.org/static/images/sponsors/liquidweb_logo.png" alt="liquidweb logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://deriv.com/careers/" rel="noopener">
                <img class="footer-sponsor-deriv" src="https://metacpan.org/static/images/sponsors/deriv.svg" alt="Deriv logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://geocode.xyz" rel="noopener">
                <img class="footer-sponsor-geocode" src="https://metacpan.org/static/images/sponsors/geocodelogo.svg" alt="Geocode logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://www.fastly.com/" rel="noopener">
                <img class="footer-sponsor-fastly" src="https://metacpan.org/static/images/sponsors/fastly_logo.svg" alt="Fastly logo">
              </a>
              <a class="footer-sponsor-link" target="_blank" href="https://opencagedata.com" rel="noopener">
                <img class="footer-sponsor-opencage" src="https://metacpan.org/static/images/sponsors/open-cage.svg" alt="OpenCage logo">
              </a>
            </div>
          </div>
        </footer>
        <div class="modal fade" tabindex="-1" role="dialog" id="metacpan_keyboard-shortcuts">
          <div class="modal-dialog">
            <div class="modal-content">
              <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <h4 class="modal-title">Keyboard Shortcuts</h4>
              </div>
              <div class="modal-body row">
<div class="col-md-6">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>Global</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>s</kbd>
        </td>
        <td>Focus search bar</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>?</kbd>
        </td>
        <td>Bring up this help dialog</td>
      </tr>
    </tbody>
  </table>

  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>GitHub</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>p</kbd>
        </td>
        <td>Go to pull requests</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>i</kbd>
        </td>
        <td>go to github issues (only if github is preferred repository)</td>
      </tr>
    </tbody>
  </table>
</div>

<div class="col-md-6">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>POD</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>a</kbd>
        </td>
        <td>Go to author</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>c</kbd>
        </td>
        <td>Go to changes</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>i</kbd>
        </td>
        <td>Go to issues</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>d</kbd>
        </td>
        <td>Go to dist</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>r</kbd>
        </td>
        <td>Go to repository/SCM</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>s</kbd>
        </td>
        <td>Go to source</td>
      </tr>
      <tr>
        <td class="keys">
          <kbd>g</kbd> <kbd>b</kbd>
        </td>
        <td>Go to file browse</td>
      </tr>

    </tbody>
  </table>
</div>

<div class="col-md-12">
  <table class="table keyboard-shortcuts">
    <thead>
      <tr>
        <th></th>
        <th>Search terms</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><em>module:</em> (e.g. <a href="https://metacpan.org/search?q=module%3APlugin">module:Plugin</a>)</td>
      </tr>
      <tr>
        <td><em>distribution:</em> (e.g. <a href="https://metacpan.org/search?q=distribution%3ADancer+auth">distribution:Dancer auth</a>)</td>
      </tr>
      <tr>
        <td><em>author:</em> (e.g. <a href="https://metacpan.org/search?q=author%3ASONGMU+Redis">author:SONGMU Redis</a>)</td>
      </tr>
      <tr>
        <td><em>version:</em> (e.g. <a href="https://metacpan.org/search?q=version%3A1.00">version:1.00</a>)</td>
      </tr>
    </tbody>
  </table>
</div>
              </div>
              <div class="modal-footer"></div>
            </div>
          </div>
        </div>
    </body>
</html>
